You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
attr_reader foo: untyped in RBS defines the signature for the method #foo as would def foo: () -> untyped
with Steep::Diagnostic::Ruby::MethodDefinitionMissing Steep expects the method #foo from the above
attr_reader in Ruby defines the method #foo yet Steep can't find it, even though both .rb and .rbsuseattr_reader` semantics
Expected result:
attr_reader foo: untyped should be able to find attr_reader-defined methods
Arguably def foo: () -> untyped + @foo: untyped should also work with and find attr_reader :foo
Same for attr_writer and attr_accessor and #foo=
Actual result:
# foo.rb
class Foo
attr_reader :foo
end
# foo.rbs
class Foo
attr_reader foo: untyped
end
# Steepfile
target :lib do
configure_code_diagnostics do |hash|
hash[Steep::Diagnostic::Ruby::MethodDefinitionMissing] = :error
end
check '.'
signature '.'
end
attr_reader foo: untyped
in RBS defines the signature for the method#foo
as woulddef foo: () -> untyped
Steep::Diagnostic::Ruby::MethodDefinitionMissing
Steep expects the method#foo
from the aboveattr_reader
in Ruby defines the method#foo
yet Steep can't find it, even though both.rb
and .rbsuse
attr_reader` semanticsExpected result:
attr_reader foo: untyped
should be able to findattr_reader
-defined methodsdef foo: () -> untyped
+@foo: untyped
should also work with and findattr_reader :foo
attr_writer
andattr_accessor
and#foo=
Actual result:
The text was updated successfully, but these errors were encountered: