Summary: Post-position attributes cannot be used with auto
                    return functions
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Max Samukha <> 2010-09-14 07:47:27 
PDT ---
struct S
    auto foo() const //line 8
        return 1; //line 10

void main()

test.d(8): no identifier for declarator foo
test.d(8): semicolon expected, not 'pure'
test.d(10): Declaration expected, not 'return'

Applies to any attribute that can be specified after the declaration. The
example compiles if the return type is explicitly specified or the attribute is
put in front of the declaration.

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

Reply via email to