[Issue 11148] Can't implicitly convert const(BigInt) or immutable(BigInt) to BigInt

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 10 11:39:19 PDT 2013


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



--- Comment #5 from hsteoh at quickfur.ath.cx 2013-10-10 11:39:18 PDT ---
You can't pass an immutable(BigInt) to a function that takes unqual BigInt,
because that breaks the type system (and risks breaking immutability). The
function needs to take const(BigInt) if it doesn't need to propagate qualifiers
to its return type, or inout(BigInt) if it does.

If the function needs to modify the BigInt, then it should rightly reject any
attempt to pass in an immutable BigInt.

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