Exception: RBS::CyclicTypeParameterBound

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

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.



511
512
513
514
515
516
517
518
# File 'lib/rbs/errors.rb', line 511

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

#locationObject (readonly)

Returns the value of attribute location.



509
510
511
# File 'lib/rbs/errors.rb', line 509

def location
  @location
end

#method_nameObject (readonly)

Returns the value of attribute method_name.



509
510
511
# File 'lib/rbs/errors.rb', line 509

def method_name
  @method_name
end

#paramsObject (readonly)

Returns the value of attribute params.



509
510
511
# File 'lib/rbs/errors.rb', line 509

def params
  @params
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



509
510
511
# File 'lib/rbs/errors.rb', line 509

def type_name
  @type_name
end