Skip to content

Commit

Permalink
Fix include a module under included module
Browse files Browse the repository at this point in the history
See the test. The pattern made TypeProf error due to strange recursion.
  • Loading branch information
mame committed Aug 7, 2024
1 parent 5df21a8 commit e3729ad
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/typeprof/core/env/static_read.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def propagate(genv)
@followers.each do |follower|
case follower
when ModuleEntity
follower.on_parent_modules_changed(genv)
genv.add_static_eval_queue(:parent_modules_changed, follower)
when ScopedStaticRead
follower.on_cbase_updated(genv)
when Box, IsAFilter
Expand Down
18 changes: 18 additions & 0 deletions scenario/class/include-hack.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## update
module Foo
module Bar
end
end

module Baz
include Foo
include Bar
end

## assert
module Foo
module Foo::Bar
end
end
module Baz
end

0 comments on commit e3729ad

Please sign in to comment.