Class: Steep::Diagnostic::Ruby::TypeArgumentMismatchError
- Includes:
- ResultPrinter
- Defined in:
- lib/steep/diagnostic/ruby.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#type_argument ⇒ Object
readonly
Returns the value of attribute type_argument.
-
#type_parameter ⇒ Object
readonly
Returns the value of attribute type_parameter.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(type_arg:, type_param:, result:, location:) ⇒ TypeArgumentMismatchError
constructor
A new instance of TypeArgumentMismatchError.
Methods included from ResultPrinter
#detail_lines, #relation_message
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(type_arg:, type_param:, result:, location:) ⇒ TypeArgumentMismatchError
Returns a new instance of TypeArgumentMismatchError.
882 883 884 885 886 887 |
# File 'lib/steep/diagnostic/ruby.rb', line 882 def initialize(type_arg:, type_param:, result:, location:) super(node: nil, location: location) @type_argument = type_arg @type_parameter = type_param @result = result end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
880 881 882 |
# File 'lib/steep/diagnostic/ruby.rb', line 880 def result @result end |
#type_argument ⇒ Object (readonly)
Returns the value of attribute type_argument.
880 881 882 |
# File 'lib/steep/diagnostic/ruby.rb', line 880 def type_argument @type_argument end |
#type_parameter ⇒ Object (readonly)
Returns the value of attribute type_parameter.
880 881 882 |
# File 'lib/steep/diagnostic/ruby.rb', line 880 def type_parameter @type_parameter end |
Instance Method Details
#header_line ⇒ Object
891 892 893 |
# File 'lib/steep/diagnostic/ruby.rb', line 891 def header_line "Cannot pass a type `#{type_argument}` as a type parameter `#{type_parameter.to_s}`" end |