From 96547a88637779b5c90623b5df2f70f118c1fd1b Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Wed, 25 Feb 2026 05:05:35 +0000 Subject: [PATCH] Remove ad-hoc "untyped" guard from wrong_return_type The string comparison `actual_ty == "untyped"` was no longer needed. This guard was originally needed when `check_match` was used (1a933d6), but became dead code when `check_match` was replaced with `typecheck` in 3251cbc. --- lib/typeprof/core/graph/box.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/typeprof/core/graph/box.rb b/lib/typeprof/core/graph/box.rb index 96bb6d14c..a0be290c1 100644 --- a/lib/typeprof/core/graph/box.rb +++ b/lib/typeprof/core/graph/box.rb @@ -311,7 +311,6 @@ def run0(genv, changes) def wrong_return_type(f_ret_show, changes) actual_ty = @a_ret.show - return if actual_ty == "untyped" # XXX: too ad-hoc? msg = "expected: #{ f_ret_show }; actual: #{ actual_ty }" case @node when AST::ReturnNode