Class: TypeParamCountMismatchError

Inherits:
CompilerError show all
Defined in:
lib/compiler_error.rb

Instance Method Summary collapse

Methods inherited from CompilerError

#to_s

Constructor Details

#initialize(ast, expected_count) ⇒ TypeParamCountMismatchError

Returns a new instance of TypeParamCountMismatchError.



71
72
73
74
75
# File 'lib/compiler_error.rb', line 71

def initialize ast, expected_count
	super ast.position
	@expected_count = expected_count
	@actual_count = ast.params.length
end

Instance Method Details

#infoObject



77
78
79
# File 'lib/compiler_error.rb', line 77

def info
	"generic parameter count mismatch: expected #{@expected_count}, provided #{@actual_count}"
end