[Issue 14144] New: opAssign seems broken in master
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Feb 7 16:27:48 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14144
Issue ID: 14144
Summary: opAssign seems broken in master
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: deadalnix at gmail.com
As per dustmite :
struct JSON {
union {
double _floating;
}
this(typeof(null) ) {
}
@trusted pure nothrow typeof(null) opAssign(typeof(null) nothing) {
return null;
}
}
unittest {
JSON[string] x;
x["wat"] = null;
}
$ ../dmd/src/dmd json.d -unittest
json.d(20): Error: incompatible types for ((x["wat"].opAssign(null)) :
(x["wat"] = JSON , x["wat"].this(null))): 'typeof(null)' and 'JSON'
It work on the release and is breaking SDC.
--
More information about the Digitalmars-d-bugs
mailing list