http://d.puremagic.com/issues/show_bug.cgi?id=3744
--- Comment #5 from iorlas <denis.tomi...@gmail.com> 2010-01-27 03:05:12 PST --- (In reply to comment #4) > Just had a look at your test code. > The problem lies here: > > foreach(string m; a){ > __traits(getMember, Check, m) > } > m is not a compile-time constant. Of course it _should_ be, but it's not. Yeah, i understand this, but i think this function(has/getMember and some other) useless if it can't be used in runtime. > One thing you could try in traits.c is to replace: > e = e->optimize(WANTvalue); > with e = e->interpret(NULL); > and that'll probably get it working. With this fix compiles ok, but if i want to get string representation of type from variable(typeid(typeof(__traits(getMember, Check, m)))), i've get always one string: fail.Check(). But if i try ti get this from Check.a, i've get a "int". I dunno why, cuz i think this is bad fix. > But the real problem is in tuple foreach: the iteration variable should be a > compile-time constant. This is problem why it doesn't compiles, ofc. But i need a functionality rather then perfectly compiles "hello world", lol. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------