Skip to content

Commit

Permalink
Add an rbs for TypeProf namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mame committed Jul 22, 2024
1 parent 6b94886 commit 521b1b1
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
37 changes: 37 additions & 0 deletions scenario/class/unknown-cbase.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## update: test.rb
class Foo::Bar
class C
def foo
1
end
end
end

# Currently, Foo::Bar::C cannot be resolved because there is no definition of Foo
class D < Foo::Bar::C
def check = foo
end

## assert: test.rb
class Foo::Bar
class Foo::Bar::C
def foo: -> Integer
end
end
class D # failed to identify its superclass
def check: -> untyped
end

## update: test.rbs
module Foo
end

## assert: test.rb
class Foo::Bar
class Foo::Bar::C
def foo: -> Integer
end
end
class D < Foo::Bar::C
def check: -> Integer
end
2 changes: 2 additions & 0 deletions sig/typeprof.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module TypeProf
end

0 comments on commit 521b1b1

Please sign in to comment.