consistent?(other)
click to toggle source
def consistent?(other)
case other
when Type::Instance
@klass.consistent?(other.klass)
when Type::Class
return true if @klass == Type::Builtin[:obj] || @klass == Type::Builtin[:class] || @klass == Type::Builtin[:module]
return false
else
false
end
end
inspect()
click to toggle source
def inspect
"I[#{ @klass.inspect }]"
end
method_dispatch_info()
click to toggle source
def method_dispatch_info
[@klass, false, @include_subclasses]
end
screen_name(scratch)
click to toggle source
def screen_name(scratch)
case @klass
when Type::Builtin[:nil] then "nil"
when Type::Builtin[:true] then "true"
when Type::Builtin[:false] then "false"
else
scratch.get_class_name(@klass) + (@include_subclasses ? "" : "")
end
end
substitute(subst, depth)
click to toggle source
def substitute(subst, depth)
Instance.new(@klass.substitute(subst, depth))
end