[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:55:32 PDT 2013


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



--- Comment #6 from Joseph Rushton Wakeling <joseph.wakeling at webdrake.net> 2013-10-10 11:55:30 PDT ---
(In reply to comment #5)
> If the function needs to modify the BigInt, then it should rightly reject any
> attempt to pass in an immutable BigInt.

Well, suppose you have some function of the form,

    T foo(T)(T n)
    {
        Unqual!T a = n;
        // ... do mutable stuff with a
        return a;
    }

That still won't work if T is an immutable(BigInt), because the first line will
fail: you can't copy from the immutable to mutable.

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