Summary: Forward reference error from static function with no
                    return type
           Product: D
           Version: future
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2010-05-14 04:59:19 PDT ---
This is D2 code:

static foo() {
    return 1.0;
enum double x = foo(); // line 4
void main() {}

dmd v2.045 shows at compile time:
test.d(4): Error: forward reference to foo

The error message is wrong in two ways:
- It doesn't show the error of the missing return type of foo at line 1
- There is a forward reference error that D isn't supposed to generate here

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to