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

--- Comment #0 from Don <> 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:
------- You are receiving this mail because: -------

Reply via email to