-
Notifications
You must be signed in to change notification settings - Fork 771
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
Type checking is not working for intermediate variables #691
Comments
Yeah, that's a bad bug. Definitely need to fix that in 0.2. |
Did some digging on this; it's actually not going to be that simple to fix. In type validation we check for various syntaxes to recurse over:
We need to ensure we recurse over VariableAccessSyntax, but need to be careful to attach diagnostics to the reference to the variable reference, rather than the variable value itself. |
We should make sure when we fix this that for the following: var varWithLiterals = [
{
prop: 'ValA'
}
{
prop: 'ValB'
}
] Our type system should be able to infer the type of: varWithLiterals[someIndex].prop as |
I'm planning to discuss this with the team today - we have some decisions to make about what the errors will look like. |
Notes from discussion:
|
Repro here:
The text was updated successfully, but these errors were encountered: