[Issue 4865] New: Post-position attributes cannot be used with auto return functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 14 07:47:58 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4865

           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
        AssignedTo: nobody at puremagic.com
        ReportedBy: samukha at voliacable.com


--- Comment #0 from Max Samukha <samukha at voliacable.com> 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list