class DuplicateDefError

Public Class Methods

new(type, name, old_ast, new_ast) click to toggle source
Calls superclass method CompilerError::new
# File lib/compiler_error.rb, line 44
def initialize type, name, old_ast, new_ast
        super new_ast.position
        @type = type
        @name = name
        @old_pos = old_ast.position
        @new_pos = new_ast.position
end

Public Instance Methods

info() click to toggle source
# File lib/compiler_error.rb, line 52
def info
        "'#{@name}' : #{@type} redefinition\n        #{@old_pos} : see previous #{@type} definition of '#{@name}'"
end