Exception: RBS::CyclicTypeParameterBound
- Includes:
- DetailedMessageable
- Defined in:
- lib/rbs/errors.rb,
sig/errors.rbs
Instance Attribute Summary collapse
-
#location ⇒ Location[untyped, untyped]?
readonly
Returns the value of attribute location.
-
#method_name ⇒ Symbol?
readonly
Method name.
-
#params ⇒ Array[AST::TypeParam]
readonly
Array of parameters which contains cyclic dependencies.
-
#type_name ⇒ TypeName
readonly
Type name.
Instance Method Summary collapse
-
#initialize(type_name:, method_name:, params:, location:) ⇒ CyclicTypeParameterBound
constructor
A new instance of CyclicTypeParameterBound.
Methods included from DetailedMessageable
Constructor Details
#initialize(type_name:, method_name:, params:, location:) ⇒ CyclicTypeParameterBound
Returns a new instance of CyclicTypeParameterBound.
564 565 566 567 568 569 570 571 |
# File 'lib/rbs/errors.rb', line 564 def initialize(type_name:, method_name:, params:, location:) @type_name = type_name @method_name = method_name @params = params @location = location super "#{Location.to_string(location)}: Cyclic type parameter bound is prohibited" end |
Instance Attribute Details
#location ⇒ Location[untyped, untyped]? (readonly)
Returns the value of attribute location.
562 563 564 |
# File 'lib/rbs/errors.rb', line 562 def location @location end |
#method_name ⇒ Symbol? (readonly)
Method name
363 364 365 |
# File 'sig/errors.rbs', line 363 def method_name @method_name end |
#params ⇒ Array[AST::TypeParam] (readonly)
Array of parameters which contains cyclic dependencies.
357 358 359 |
# File 'sig/errors.rbs', line 357 def params @params end |
#type_name ⇒ TypeName (readonly)
Type name
360 361 362 |
# File 'sig/errors.rbs', line 360 def type_name @type_name end |