Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/typeprof/core/ast/call.rb
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def modified_vars(tbl, vars)
subnode.modified_vars(tbl, vars)
end
else
subnode.each {|n| n.modified_vars(tbl, vars) }
subnode.each {|n| n&.modified_vars(tbl, vars) }
end
end
end
Expand Down
7 changes: 7 additions & 0 deletions scenario/args/anonymous_rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ def bar(*)
nil
end

def foo_in_if(*)
if true
bar(*)
end
end

bar(1, "foo")

## assert
class Object
def foo: (*untyped) -> nil
def bar: (*Integer | String) -> nil
def foo_in_if: (*untyped) -> nil
end
Loading