The class grammar, as defined in the D language specification (Classes), seems to imply that a class can inherit from a fundamental type. Explicitly, the specification says that a 'SuperClass' is a 'BasicType'. And a 'FundamentalType' is a 'BasicType'.
However, when I attempt to compile the following declaration, I get an error.
class A : int {}
Error: class `test.A` base type must be `class` or `interface`, not `int`
After reading the grammar for a 'BasicType' (BasicType), it is not clear to me how a user-defined type (such as a class or interface) is also a 'BasicType' (as defined by the grammar). However, the compiler only accepts classes or interfaces as a base type.
How am I misunderstanding the specification?