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: nob...@puremagic.com
          Reporter: issues.dl...@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.

--

Reply via email to