Bug 19272 – scope class and const/immutable doesn't work together

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-09-28T08:24:29Z
Last change time
2024-12-13T19:00:43Z
Assigned to
No Owner
Creator
Jacob Carlborg
Moved to GitHub: dmd#19489 →

Comments

Comment #0 by doob — 2018-09-28T08:24:29Z
The following code fails to compile with DMD 2.082.0: void main() { scope a = new const Object; // Error: cannot modify `const` expression `a` scope b = new immutable Object; // Error: cannot modify `immutable` expression `b` }
Comment #1 by pro.mathias.lang — 2020-07-06T03:36:38Z
*** Issue 20169 has been marked as a duplicate of this issue. ***
Comment #2 by nick — 2022-05-30T13:38:43Z
*** Issue 21692 has been marked as a duplicate of this issue. ***
Comment #3 by robert.schadek — 2024-12-13T19:00:43Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19489 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB