Bug 15931 – The compiler lets you try to derive from a const, immutable, or inout, shared class

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-04-16T00:21:46Z
Last change time
2024-12-13T18:47:27Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
Jonathan M Davis
Moved to GitHub: dmd#17752 →

Comments

Comment #0 by issues.dlang — 2016-04-16T00:21:46Z
This code compiles withut error: class C { } class D : const(C) { } void main() { } I assume that this is just another case of the compiler ignoring an attribute when it doesn't apply, but in this case, it's pointless and potentially confusing. immutable, inout, and shared are also all currently allowed by the compiler.
Comment #1 by robert.schadek — 2024-12-13T18:47:27Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17752 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB