diff --git a/lib/typeprof/core/ast/sig_type.rb b/lib/typeprof/core/ast/sig_type.rb index 7f5ca9dc..9565e90d 100644 --- a/lib/typeprof/core/ast/sig_type.rb +++ b/lib/typeprof/core/ast/sig_type.rb @@ -5,7 +5,7 @@ def self.typecheck_for_module(genv, changes, f_mod, f_args, a_vtx, subst) a_vtx.each_type do |ty| ty = ty.base_type(genv) while ty - if ty.mod == f_mod + if ty.mod == f_mod && ty.is_a?(Type::Instance) args_all_match = true f_args.zip(ty.args) do |f_arg_node, a_arg_ty| unless f_arg_node.typecheck(genv, changes, a_arg_ty, subst)