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

Fixes #2925. Fix expected errors positions in grammar_A05_t01_lib.dart #2929

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

sgrekhov
Copy link
Contributor

No description provided.

Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

It's a rather special situation that a particular Dart source file doesn't even get parsed, but the behavior seems reasonable in practice so let's just go with that.

@eernstg eernstg merged commit 9d11c67 into dart-lang:master Oct 10, 2024
1 of 2 checks passed
@eernstg
Copy link
Member

eernstg commented Oct 10, 2024

Thinking again: Wouldn't it be nice to have a comment at the location where we just had an error expectation comment? It should say something like

// This is a syntax error, but the tools will recognize `library` above and omit
// all further analysis of this file, because it was expected to be a part file.
// Hence, the syntax error (and any other errors in this file) will not be
// reported.

I just landed this one, so that would be a new PR.

@sgrekhov
Copy link
Contributor Author

#2931

copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Oct 11, 2024
2024-10-10 sgrekhov22@gmail.com dart-lang/co19#2925. Add comment explaining why the syntax error is not reported in grammar_A05_t01_lib.dart (dart-lang/co19#2931)
2024-10-10 sgrekhov22@gmail.com Fixes dart-lang/co19#2925. Fix expected errors positions in grammar_A05_t01_lib.dart (dart-lang/co19#2929)
2024-10-09 sgrekhov22@gmail.com dart-lang/co19#2923. More tests for import and export library with the same URI. (dart-lang/co19#2928)
2024-10-09 sgrekhov22@gmail.com Fixes dart-lang/co19#2926. Remove unnecessary error expectation from grammar_A04_t01.dart (dart-lang/co19#2927)
2024-10-08 sgrekhov22@gmail.com dart-lang/co19#2923. Add tests for import/exports with the same URI (dart-lang/co19#2924)
2024-10-07 sgrekhov22@gmail.com dart-lang/co19#2825. Fix dotted.library.name syntax in `part of` directive (dart-lang/co19#2922)
2024-10-04 sgrekhov22@gmail.com dart-lang/co19#2559. Add augmenting enum values test. (dart-lang/co19#2921)

Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try
Change-Id: I81902e4e4eac8a0b0ffd3f20d957aa9bfcc2cdc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389700
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants