Bug 11443 – Misleading error for mismatch overloaded operator if there are immutable members

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-05T05:51:47Z
Last change time
2024-12-13T18:13:43Z
Keywords
diagnostic
Assigned to
No Owner
Creator
Denis Shelomovskii
Moved to GitHub: dmd#17623 →

Comments

Comment #0 by verylonglogin.reg — 2013-11-05T05:51:47Z
--- struct S { const int i; void opOpAssign(string op : "+")(int) { } void opOpAssign(string op : "~")(int) { } } void main() { S s; s += ""; // Error: cannot modify struct s S with immutable members s ~= ""; // Error: cannot modify struct s S with immutable members } ---
Comment #1 by robert.schadek — 2024-12-13T18:13:43Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17623 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB