-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
never
type lookup - "Cannot find type never"
#136
Comments
@kaleidawave I started a branch for Also, confirmed that tsc does enough reachability analysis to verify the return type of an infinite loop is |
never
type parsing - "Cannot find type never"never
type lookup - "Cannot find type never"
Ah yes this is a good bug. So some types are special as they need to be referenced inside the checker. These types such as The reason why it "Cannot find type
Awesome, so the next part is about the unreachability. That's also not implemented. You can check out features/iteration.rs for the current |
@kaleidawave It's an interesting question you posed about shadowing |
Interesting. That's actually quite a good idea. I could see having a type parameter named So your addition to the type annotation name lookup is correct and my suggestion about the I think type shadowing works ATM (although it seems I have added any tests for it). Adding prevention and emitting of errors around invalid type aliases and type parameter names needs adding. |
- Change subtyping to use single state structure (rather than generic structures) - Change substitution to use single immutable object for arguments - Changes to accomodate the above - `* extends * ? `, `infer U` and distributive extends - Add `never` #136 + or folding - Other WIP stuff
- Change subtyping to use single state structure (rather than generic structures) - Change substitution to use single immutable object for arguments - `* extends * ? `, `infer U` and distributive extends - Add `never` #136 + or folding - Other stuff in PR description + changed tests
|
When I check this block of code I get an error of "Cannot find type never".
I suspect this is an issue at the parsing stage, because there is already code in the subtyping logic that checks for the
never
type.The text was updated successfully, but these errors were encountered: