Class: BELParser::Language::Semantics::SemanticsInvalidReturnTypeWarning
- Inherits:
-
SemanticsWarning
- Object
- SemanticsResult
- SemanticsWarning
- BELParser::Language::Semantics::SemanticsInvalidReturnTypeWarning
- Defined in:
- lib/bel_parser/language/semantics_ast_warnings.rb
Instance Attribute Summary
Attributes inherited from SemanticsResult
#expression_node, #specification
Instance Method Summary collapse
-
#initialize(expression_node, spec, expected_return_types) ⇒ SemanticsInvalidReturnTypeWarning
constructor
A new instance of SemanticsInvalidReturnTypeWarning.
- #to_s ⇒ Object
Methods inherited from SemanticsWarning
Methods inherited from SemanticsResult
Constructor Details
#initialize(expression_node, spec, expected_return_types) ⇒ SemanticsInvalidReturnTypeWarning
Returns a new instance of SemanticsInvalidReturnTypeWarning.
122 123 124 125 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 122 def initialize(expression_node, spec, expected_return_types) super(expression_node, spec) @expected_return_types = expected_return_types end |
Instance Method Details
#to_s ⇒ Object
127 128 129 130 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 127 def to_s function = @expression_node.string_literal %(Function of "#{function}" does not match return types: #{@expected_return_types.map(&:to_sym).join(', ')}) end |