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?]
Attributes
nonregular_type
[R]
Types::Alias
Public Class Methods
(type_name: TypeName, nonregular_type: Types::Alias) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/type_alias_regularity.rb, line 8 def initialize(type_name:, nonregular_type:) @type_name = type_name @nonregular_type = nonregular_type end