[Issue 9404] New: Nullable is unusable with 2.061

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 26 07:43:30 PST 2013


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

           Summary: Nullable is unusable with 2.061
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: lomereiter at gmail.com


--- Comment #0 from Artem Tarasov <lomereiter at gmail.com> 2013-01-26 07:43:28 PST ---
http://dpaste.dzfl.pl/5bf80d80

import std.typecons;

struct Foo {
    Nullable!int n;
}

struct Bar {
    Foo wtf;
    this(Foo t) {
        wtf = t;
    }
}

void main() {
    Foo foo;
    Bar(foo);
}

This code throws an exception with the following backtrace:

object.Exception@/home/lomereiter/.dvm/compilers/dmd-2.061/bin/../src/phobos/std/typecons.d(1181):
Enforcement failed
----------------
./wtf(bool std.exception.enforce!(bool).enforce(bool, lazy const(char)[],
immutable(char)[], ulong)+0x65) [0x416c45]
./wtf(std.typecons.Nullable!(int).Nullable.getinout(pure ref @property @safe
inout(int) function())+0x89) [0x416a45]
./wtf(ref wtf.Foo wtf.Foo.opAssign(wtf.Foo)+0x51) [0x416b05]
./wtf(wtf.Bar wtf.Bar.__ctor(wtf.Foo)+0x18) [0x416b30]

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