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
Typechecking for singletons (the pattern) doesn't seem to work as expected.
E.g. given an rb file
# frozen_string_literal: true
require "singleton"
module A
module Example
class TestClass
include Singleton
end
end
end
A::Example::TestClass.instance
and and RBS file:
module A
module Example
VERSION: String
class TestClass
include Singleton
end
end
end
steep complains about: Type singleton(::A::Example::TestClass) does not have method instance.
The simples possible Steepfile i could come up with for the repro case:
target :lib do
signature "sig"
check "lib"
library "singleton"
end
Given that there are some moving parts involved but also there's still active development going on, I wonder whether this supposed to even work right now?
In the original project The class including Singleton also extends Forwardable and so i was somehow hoping that it's just some weirdness. But even in this simple repro case it just doesn't work as expected.
The text was updated successfully, but these errors were encountered:
Typechecking for singletons (the pattern) doesn't seem to work as expected.
E.g. given an
rb
fileand and RBS file:
steep
complains about:Type singleton(::A::Example::TestClass) does not have method instance
.The simples possible
Steepfile
i could come up with for the repro case:Given that there are some moving parts involved but also there's still active development going on, I wonder whether this supposed to even work right now?
In the original project The class including
Singleton
also extendsForwardable
and so i was somehow hoping that it's just some weirdness. But even in this simple repro case it just doesn't work as expected.The text was updated successfully, but these errors were encountered: