lib/steep/interface/builder.rb in steep-1.9.0.dev.2 vs lib/steep/interface/builder.rb in steep-1.9.0
- old
+ new
@@ -64,11 +64,11 @@
end
def shape(type, config)
Steep.logger.tagged "shape(#{type})" do
if shape = raw_shape(type, config)
- # Optimization that skips unnecesary substittuion
+ # Optimization that skips unnecessary substitution
if type.free_variables.include?(AST::Types::Self.instance)
shape
else
if s = config.subst
shape.subst(s)
@@ -170,11 +170,11 @@
end
when AST::Types::Var
if bound = config.upper_bound(type.name)
new_config = Config.new(self_type: bound, variable_bounds: config.variable_bounds)
sub = Substitution.build([], self_type: type)
- # We have to use `self_shape` insead of `raw_shape` here.
+ # We have to use `self_shape` instead of `raw_shape` here.
# Keep the `self` types included in the `bound`'s shape, and replace it to the type variable.
self_shape(bound, new_config)&.subst(sub, type: type)
end
when AST::Types::Nil
subst = class_subst(AST::Builtin::NilClass.instance_type).update(self_type: type)
@@ -836,6 +836,5 @@
end
end
end
end
end
-