← Back to index
|
Original Bugzilla link
Bug 12559 – Multi operators with template mixins produces an error
Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-11T11:20:10Z
Last change time
2024-12-13T18:19:44Z
Assigned to
No Owner
Creator
Temtaime
Moved to GitHub: dmd#18814 →
Comments
Comment #0
by temtaime — 2014-04-11T11:20:10Z
mixin template T() { S opBinary(string s)(S s) { return S(); } } struct S { S opBinary(string s)(S s) if(0) { return S(); } mixin T; } void main() { S a, b; a + b; } Error: incompatible types for ((a) + (b)): 'S' and 'S' But struct S { S opBinary(string s)(S s) if(0) { return S(); } S opBinary(string s)(S s) { return S(); } } void main() { S a, b; a + b; } Compiles ok
Comment #1
by robert.schadek — 2024-12-13T18:19:44Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/18814
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB