Summary: Inferring function return type with attributes on both
                    sides of signature
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Lars T. Kyllingstad <> 2011-06-23 
13:18:39 PDT ---
Test case:

    @property foo() pure { return 1; }


    a.d(1): function declaration without return type.
    (Note that constructors are always named 'this')
    a.d(1): no identifier for declarator pure foo()

Both '@property' and 'pure' can be exchanged for any of @safe, nothrow, const,
etc. -- the point is that one attribute comes before the function signature and
the other comes after.

If 'pure' is removed, the return type is successfully inferred to be int.

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

Reply via email to