http://d.puremagic.com/issues/show_bug.cgi?id=5969
Summary: Poor error message for foreach over type tuple Product: D Version: D1 & D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: clugd...@yahoo.com.au --- Comment #0 from Don <clugd...@yahoo.com.au> 2011-05-09 08:19:38 PDT --- This code fails with a back-end error: test.d(7): Error: type Foo is not an expression struct Foo { int a; } int foo() { foreach (f; Foo.tupleof) {} return 1; } //static assert(foo()); It should be a front-end error. If you uncomment the static assert, you get a cryptic "cannot interpret Foo at compile time" error. But the error should have been detected before CTFE was initiated. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------