https://d.puremagic.com/issues/show_bug.cgi?id=12131

           Summary: Struct assign purity error
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2014-02-10 09:55:43 PST ---
This comes from reduction of code that uses BigInt, I don't understand this
problem:


import std.internal.math.biguintcore;
struct Foo { BigUint a; }
void main() pure {
    BigUint x;
    x = BigUint(); // OK
    Foo y;
    y = Foo(); // Error
}


DMD 2.065beta3 gives:

test.d(7): Error: pure function 'D main' cannot call impure function
'test.Foo.opAssign'

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

Reply via email to