We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i'm finding an issue typing the following structure:
class A def initialize(a, b) @a = a @b = b end end class B < A def initialize(a, b) super yield self if block_given? end
class A def initialize: (Integer a, String b) -> void end class B def initialize: (Integer a, String b) { (self) -> void } -> void end
When I use runtime type-checking via rbs test using smth like B.new(1, "a") { |b| puts b }, I get an error similar to:
rbs test
B.new(1, "a") { |b| puts b }
RuntimeError: Neutered Exception RBS::Test::Tester::TypeError: TypeError: [B#initialize] ArgumentTypeError: expected `String` (b) but given `1`
Where the first argument is being incorrectly passed the second argumet type def.
I can workaround that now by doing the block-based definition on A's rbs file, which is wrong, but it at least fixes it.
A
The text was updated successfully, but these errors were encountered:
No branches or pull requests
i'm finding an issue typing the following structure:
When I use runtime type-checking via
rbs test
using smth likeB.new(1, "a") { |b| puts b }
, I get an error similar to:Where the first argument is being incorrectly passed the second argumet type def.
I can workaround that now by doing the block-based definition on
A
's rbs file, which is wrong, but it at least fixes it.The text was updated successfully, but these errors were encountered: