http://d.puremagic.com/issues/show_bug.cgi?id=7449
Summary: Algebraic's operator[] is incorrect
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrei Alexandrescu <[email protected]> 2012-02-05
20:26:58 PST ---
import std.variant;
import std.stdio;
void main() {
int[string] o;
o["foo"] = 42;
Variant a = o;
Algebraic!(int[string], string) b = o;
writeln(a["foo"]);
writeln(b["foo"]);
}
The last line fails at runtime with an exception.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------