Exception: RBS::CyclicTypeParameterBound

Inherits:
BaseError
  • Object
show all
Includes:
DetailedMessageable
Defined in:
lib/rbs/errors.rb,
sig/errors.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DetailedMessageable

#detailed_message

Constructor Details

#initialize(type_name:, method_name:, params:, location:) ⇒ CyclicTypeParameterBound

Returns a new instance of CyclicTypeParameterBound.

Parameters:



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

#locationLocation[untyped, untyped]? (readonly)

Returns the value of attribute location.

Returns:



562
563
564
# File 'lib/rbs/errors.rb', line 562

def location
  @location
end

#method_nameSymbol? (readonly)

Method name

Returns:

  • (Symbol, nil)


363
364
365
# File 'sig/errors.rbs', line 363

def method_name
  @method_name
end

#paramsArray[AST::TypeParam] (readonly)

Array of parameters which contains cyclic dependencies.

Returns:



357
358
359
# File 'sig/errors.rbs', line 357

def params
  @params
end

#type_nameTypeName (readonly)

Type name

Returns:



360
361
362
# File 'sig/errors.rbs', line 360

def type_name
  @type_name
end