-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
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
Build T::Class[AttachedClass]
#62
Comments
^ correctly modeling this requires |
Correctly modeling this return value is blocked by this issue: #62
subscribing. cc @axyjo |
subscribing |
* Add empty sorbet_globalConstructors function * Replace all appendToGlobalCtors with sorbet_globalConstructors * tools/scripts/update_exp_files.sh * fixup: Use auto * Fixup
I left this comment yesterday on #3856. Is it a dupe of #62? (Either way, this capability would be great for my mocking library, Mocktail! Without it there's not much value in typing) |
It's a bit unclear to me from the example given whether this actually covers the same use-case as #3856. Specifically this example does not make any use of type parameters. Does fixing this issue imply that the following signature will be possible? sig { type_parameters(:E).param(T::Class[T.type_parameter(:E)]).returns(T.type_parameter(:E)) } If not, I think #3856 is a separate issue. |
Input
→ View on sorbet.run
Observed output
Expected behavior
T.let
holdsx
isM
x.some_instance_method
type checks.The text was updated successfully, but these errors were encountered: