[Issue 14344] New: [REG2.067] Wrong opBinary call in construction
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Mar 26 07:13:44 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14344
Issue ID: 14344
Summary: [REG2.067] Wrong opBinary call in construction
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: k.hara.pg at gmail.com
Issue case:
struct CSSScale {
CSSScale opBinary(string op)(CSSScale v) {
static assert(op != "="); // line 3
assert(0);
}
}
struct CSSScaleMix {
CSSScale cssScaleA;
alias cssScaleA this;
}
class TextHighlighter {
CSSScaleMix height () {assert(0);}
void update() {
CSSScale height = this.height; // line 16
}
}
Output:
test.d(3): Error: static assert ("=" != "=") is false
test.d(16): instantiated from here: opBinary!"="
The regression introduced in:
https://github.com/D-Programming-Language/dmd/pull/4054
--
More information about the Digitalmars-d-bugs
mailing list