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

           Summary: immutable return type specifier without parantheses
                    confuses the compiler
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2010-08-26 
14:15:31 PDT ---
import std.stdio;

class Test
{
    immutable char foo()
    {
        return 'z';
    }
}

unittest
{
    auto test = new Test;
    test.foo();
}

void main()
{
}

error:
test2.d(16): Error: function test2.Test.foo () immutable is not callable using
argument types ()

Note that using const instead of immutable works.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to