class RBS::TypeAliasRegularity::Diagnostic

Diagnostic represents an non-regular type alias declaration error. It consists of the name of the alias type and a type on which the nonregularity is detected.

type t[T] = Integer | t[T?]

The type t is nonregular because it contains t[T?] on it’s right hand side.

diagnostic = validator.nonregular?(TypeName.parse("::t"))
diagnostic.type_name         # => TypeName.parse("::t")
diagnostic.nonregular_type   # => t[T?]