http://d.puremagic.com/issues/show_bug.cgi?id=4950
Summary: Compiler fails an assert and crash when declaring a inmutable array of structs with a Variant[string] member Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: juan...@gmail.com --- Comment #0 from Juanjo Alvarez <juan...@gmail.com> 2010-09-27 12:40:23 PDT --- This crash the compiler: import std.variant; alias string function() TestFunc; struct Crashy { Variant[string] variantmember; this(Variant[string] m) { variantmember = m; } } void get_something() { immutable Crashy[] blah = [ Crashy(["one": Variant(1)]) ]; } I don't know if it is correct D2, but the compiler bails out with: dmd: expression.c:816: void expToCBuffer(OutBuffer*, HdrGenState*, Expression*, PREC): Assertion `precedence[e->op] != PREC_zero' failed. Removing the immutable works. Using DMD 2.049 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------