[Issue 3598] New: Static functions in immutable structs/classes needed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Dec 7 14:29:00 PST 2009


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

           Summary: Static functions in immutable structs/classes needed
           Product: D
           Version: 2.036
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: tomeksowi at gmail.com


--- Comment #0 from Tomasz Sowiński <tomeksowi at gmail.com> 2009-12-07 14:28:59 PST ---
Currently immutable types can't have static functions and I believe this
impediment is a bug:

immutable struct Strukt
{
    static void funkcja() { }
}

Should compile but fails with message:
function test.Strukt.funkcja without 'this' cannot be const/immutable

-- 
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