-
-
Save pocke/45e04f2c7316972ac60d67a2440f4498 to your computer and use it in GitHub Desktop.
invalid new type introducing
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
class C | |
def self.new: (String) -> untyped | |
end | |
class C2 < C | |
end | |
module M | |
def initialize: (String, Integer) -> void | |
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
# ok | |
$ rbs -I . method --singleton C new | |
::C.new | |
defined_in: ::C | |
implementation: ::C | |
accessibility: public | |
types: | |
(::String) -> untyped | |
# It should be (::String) -> untyped, but not | |
$ rbs -I . method --singleton C2 new | |
::C2.new | |
defined_in: | |
implementation: | |
accessibility: public | |
types: | |
() -> ::C2 | |
# It should be no method, but not. | |
$ rbs -I . method --singleton M new | |
::M.new | |
defined_in: | |
implementation: | |
accessibility: public | |
types: | |
(::String, ::Integer) -> ::M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment