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

Missing static error for generic type application at typed: false #6796

Open
jez opened this issue Mar 1, 2023 · 0 comments
Open

Missing static error for generic type application at typed: false #6796

jez opened this issue Mar 1, 2023 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jez
Copy link
Collaborator

jez commented Mar 1, 2023

Input

→ View on sorbet.run

# typed: false

extend T::Sig

sig {returns(T::Array[x: Integer])}
#                     ^^^^^^^^^^ this is an error at typed: true or higher
def example
  []
end

Observed output

No errors! Great job.

Expected behavior

Sorbet reports all other type syntax errors at # typed: false:

constexpr ErrorClass InvalidMethodSignature{5003, StrictLevel::False};
constexpr ErrorClass InvalidTypeDeclaration{5004, StrictLevel::False};

There's no reason why this one should be different, except that this specific error is currently an Infer error.

Once this PR lands, we will be able to simply convert these to resolver errors:

#6784

(or even accept the error code as an argument, if we want.)


@jez jez added bug Something isn't working good first issue Good for newcomers labels Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant