D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15931 - The compiler lets you try to derive from a const, immutable, or inout, shared class
Summary: The compiler lets you try to derive from a const, immutable, or inout, shared...
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2016-04-16 00:21 UTC by Jonathan M Davis
Modified: 2024-12-13 18:47 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jonathan M Davis 2016-04-16 00:21:46 UTC
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 dlangBugzillaToGithub 2024-12-13 18:47:27 UTC
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