-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Parser should report an error when 'super' is used as an expression. #43168
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
Comments
Partial implementation to unblock: https://dart-review.googlesource.com/c/sdk/+/159966, to unlock: https://dart-review.googlesource.com/c/sdk/+/159960 Bug: #43168 Change-Id: I5e3891f4ddf15c747568b38b794d75fcbd30c03a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159971 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
I'm not entirely sure why I was assigned (typo?) :D |
This is still an issue class C {
foo() {
print(super); // No error in analyzer, in CFE Error: Can't use 'super' as an expression.
}
}
main() {
C().foo();
}
@eernstg please confirm that it is an analyzer issue |
I agree that this is still an issue in the analyzer, I changed the labels accordingly. |
I don't understand why this isn't an issue for the parser. My understanding is that |
Oh, it could very well be an issue for the parser, but I just verified that the error is missing for the analyzer, and it is reported for the CFE. |
Uh oh!
There was an error while loading. Please reload this page.
[Comment by eernstg: Note that the analyzer still does not report an error in the example shown here. I'm changing the labels accordingly.]
This code currently has no errors in analyzer, but fails with CFE.
I think this is a bug in the analyzer.
But as @bwilkerson correctly pointed out, this is a syntactic error, and reported by the parser.
The text was updated successfully, but these errors were encountered: