class RBS::TypeParamDefaultReferenceError
Attributes
location
[R]
Location[untyped, untyped]?
type_param
[R]
AST::TypeParam
Public Class Methods
(Array[AST::TypeParam]) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/errors.rb, line 626 def self.check!(type_params) if errors = AST::TypeParam.validate(type_params) error = errors[0] or raise error.default_type or raise raise new(error, location: error.default_type.location) end end
(AST::TypeParam, location: Location[untyped, untyped]?) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/errors.rb, line 620 def initialize(type_param, location:) super "#{Location.to_string(location)}: the default of #{type_param.name} cannot include optional type parameter" @location = location @type_param = type_param end
Calls superclass method
Exception::new