[Issue 9718] New: [ICE] With a simple Algebraic

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 14 06:18:06 PDT 2013


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

           Summary: [ICE] With a simple Algebraic
           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 2013-03-14 06:18:05 PDT ---
import std.variant: Algebraic;
Spam foo() {
    return Spam.init;
}
struct Bar {
    Spam baz() {
        return Spam.init;
    }
}
alias Algebraic!(Bar) Spam;
void main() {}



DMD 2.063alpha gives:

Assertion failure: 'global.errors' on line 5886 in file 'template.c'



If I swap foo() and Bar{} it compiles:


import std.variant: Algebraic;
struct Bar {
    Spam baz() {
        return Spam.init;
    }
}
Spam foo() {
    return Spam.init;
}
alias Algebraic!(Bar) Spam;
void main() {}

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