Skip to content

Commit

Permalink
Fix an error on multi next statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mame committed Aug 22, 2024
1 parent 39e434f commit 3dad2f7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/typeprof/core/graph/box.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def show
class EscapeBox < Box
def initialize(node, genv, a_ret, f_ret)
super(node)
@a_ret = a_ret
@a_ret = a_ret.new_vertex(genv, node)
@f_ret = f_ret
@f_ret.add_edge(genv, self)
end
Expand Down
13 changes: 13 additions & 0 deletions scenario/regressions/multi-next.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## update
def check
["str"].map do |x|
next x
next x
1
end
end

## assert
class Object
def check: -> Array[Integer | String]
end

0 comments on commit 3dad2f7

Please sign in to comment.