[Issue 15931] New: The compiler lets you try to derive from a const, immutable, or inout, shared class
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Apr 15 17:21:46 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15931
Issue ID: 15931
Summary: The compiler lets you try to derive from a const,
immutable, or inout, shared class
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: issues.dlang at jmdavisProg.com
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.
--
More information about the Digitalmars-d-bugs
mailing list