Skip to content

Commit

Permalink
Add tests for issues ruby#95, ruby#97, and ruby#98 to v2 branch
Browse files Browse the repository at this point in the history
Co-Authored-by: Peter Wagenet <peter.wagenet@gmail.com>
  • Loading branch information
mame and wagenet committed May 24, 2024
1 parent a0f3653 commit 40a3952
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
43 changes: 43 additions & 0 deletions scenario/known-issues/constant-path.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## update: test.rb
module Baz
module Foo
class Bar < ::Foo::Bar
end
end
end

module Foo
class Bar
end
end

## assert: test.rb
module Baz
module Foo
class Bar < ::Foo::Bar
end
end
end

module Foo
class Bar
end
end

## update: test.rb
class Foo
end

module Bar
class Foo < Foo
end
end

## assert: test.rb
class Foo
end

module Bar
class Foo < ::Foo
end
end
20 changes: 20 additions & 0 deletions scenario/known-issues/struct.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## update: test.rb
Foo = Struct.new(:foo) do
def foo?
!!foo
end

private

def not_foo?
!foo
end
end

## assert: test.rb
class Foo < Struct[untyped]
def foo: -> untyped
def foo?: -> bool
private
def not_foo?: -> bool
end

0 comments on commit 40a3952

Please sign in to comment.