Skip to content
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

Can instantiate a generic type without type argument #3768

Open
Morriar opened this issue Dec 8, 2020 · 0 comments
Open

Can instantiate a generic type without type argument #3768

Morriar opened this issue Dec 8, 2020 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@Morriar
Copy link
Collaborator

Morriar commented Dec 8, 2020

Input

→ View on sorbet.run

# typed: strict

class A
  extend T::Generic

  E = type_member
end

A.new # No error? A should require type argument like `A[Foo]`

Observed output

No errors! Great job.

Sorbet treats this as A[T.untyped]

Expected behavior

I would expect Sorbet to raise an error saying A is a generic type and requires a type argument like A[Foo].

@Morriar Morriar added bug Something isn't working unconfirmed This issue has not yet been confirmed by the Sorbet team labels Dec 8, 2020
@Morriar Morriar removed the unconfirmed This issue has not yet been confirmed by the Sorbet team label Apr 30, 2021
@jez jez added this to the Generics milestone Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants