forked from ruby/typeprof
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-Authored-by: Peter Wagenet <peter.wagenet@gmail.com>
- Loading branch information
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |