type-specialization-not-self

Available in: KerML, SysML

This checks that types do not specialize themselves directly.

Such specializations have no effect. While specialization cycles are explicitly permitted by the specification, such specializations are always ignored because they are effectively duplicates of the root type.

Example

part def B :> B; // warning: Type specialization to itself has no effect

Fix this by removing specialization to itself:

part def B; // ok

Options

  • lint.type-specialization-not-self

    Allows controlling the diagnostic severity, e.g. off to disable it.


All validation rules