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.
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