Class: Steep::Errors::IncompatibleAssignment
- Includes:
- ResultPrinter
- Defined in:
- lib/steep/errors.rb
Instance Attribute Summary collapse
-
#lhs_type ⇒ Object
readonly
Returns the value of attribute lhs_type.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#rhs_type ⇒ Object
readonly
Returns the value of attribute rhs_type.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(node:, lhs_type:, rhs_type:, result:) ⇒ IncompatibleAssignment
constructor
A new instance of IncompatibleAssignment.
- #to_s ⇒ Object
Methods included from ResultPrinter
Methods inherited from Base
Constructor Details
#initialize(node:, lhs_type:, rhs_type:, result:) ⇒ IncompatibleAssignment
Returns a new instance of IncompatibleAssignment.
40 41 42 43 44 45 |
# File 'lib/steep/errors.rb', line 40 def initialize(node:, lhs_type:, rhs_type:, result:) super(node: node) @lhs_type = lhs_type @rhs_type = rhs_type @result = result end |
Instance Attribute Details
#lhs_type ⇒ Object (readonly)
Returns the value of attribute lhs_type.
34 35 36 |
# File 'lib/steep/errors.rb', line 34 def lhs_type @lhs_type end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
36 37 38 |
# File 'lib/steep/errors.rb', line 36 def result @result end |
#rhs_type ⇒ Object (readonly)
Returns the value of attribute rhs_type.
35 36 37 |
# File 'lib/steep/errors.rb', line 35 def rhs_type @rhs_type end |
Instance Method Details
#to_s ⇒ Object
47 48 49 |
# File 'lib/steep/errors.rb', line 47 def to_s "#{location_to_str}: IncompatibleAssignment: lhs_type=#{lhs_type}, rhs_type=#{rhs_type}" end |