[Issue 7449] New: Algebraic's operator[] is incorrect
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 5 20:26:59 PST 2012
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: nobody at puremagic.com
ReportedBy: andrei at metalanguage.com
--- Comment #0 from Andrei Alexandrescu <andrei at metalanguage.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list