[Issue 12131] New: Struct assign purity error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Feb 10 09:55:46 PST 2014
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: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 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: -------
More information about the Digitalmars-d-bugs
mailing list