type-specialization-unique

Available in: KerML, SysML

This checks that types do not specialize the same types twice.

Any further specializations to already specialized types have no effect.

Example

part def A;
part def B :> A, A; // warning: Duplicate specialization has no effect

part a { part b; }
part c :> a :> a; // warning: Duplicate specialization has no effect
part d :> a.b :> a.b; // warning: Duplicate specialization has no effect

Fix this by removing duplicate specializations:

part def A;
part def B :> A; // ok

part a { part b; }
part c :> a; // ok
part d :> a.b; // ok

Options

  • lint.type-specialization-unique

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


All validation rules