-
Notifications
You must be signed in to change notification settings - Fork 28
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
#2846. Add unquoted imports tests for parts #2890
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think several of these unquoted imports will fail to resolve to anything. Perhaps this PR should have added a pubspec.yaml that introduces the package co19_unquoted_imports
?
|
||
// SharedOptions=--enable-experiment=unquoted-imports,enhanced-parts | ||
|
||
part of co19_unquoted_imports; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be 'package:co19_unquoted_imports/co19_unquoted_imports.dart'
, which would also be an error as far as I can see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine now!
Oh, just found it after all: https://github.com/dart-lang/co19/blob/master/LanguageFeatures/Unquoted-imports/pubspec.yaml. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, now that I've looked twice. ;-)
|
||
// SharedOptions=--enable-experiment=unquoted-imports,enhanced-parts | ||
|
||
part of co19_unquoted_imports; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine now!
|
||
// SharedOptions=--enable-experiment=unquoted-imports | ||
|
||
part of.parts.test; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks tricky, but it should be OK: Even though it might be a part of
directive, this will fail to parse when .
is encountered, and regular parser behavior will then ensure that of
is never parsed as the keyword of
in the sequence part
, of
, it's parsed as part of an unquoted URI.
Nothing surprising about this, that's just the standard ability of parsers to resolve ambiguities based on lookahead.
2024-09-26 sgrekhov22@gmail.com dart-lang/co19#2846. Add syntax and whitespaces tests (dart-lang/co19#2896) 2024-09-26 sgrekhov22@gmail.com Fixes dart-lang/co19#2892. Change expected errors positions. (dart-lang/co19#2894) 2024-09-26 sgrekhov22@gmail.com Fixes dart-lang/co19#2893. In case of ambiguous export don't expect an error on the first export (dart-lang/co19#2895) 2024-09-26 sgrekhov22@gmail.com dart-lang/co19#2846. Add static semantics tests for unquoted imports (dart-lang/co19#2891) 2024-09-25 sgrekhov22@gmail.com dart-lang/co19#2846. Add unquoted imports tests for path separator (dart-lang/co19#2889) 2024-09-25 sgrekhov22@gmail.com dart-lang/co19#2846. Add unquoted imports tests for parts (dart-lang/co19#2890) 2024-09-24 sgrekhov22@gmail.com dart-lang/co19#2559. Update `defining_augmentation_*` tests (dart-lang/co19#2884) 2024-09-24 sgrekhov22@gmail.com dart-lang/co19#2825. Add more grammar tests (dart-lang/co19#2882) 2024-09-24 sgrekhov22@gmail.com Fixes dart-lang/co19#2878. Use pid for unique temp name (dart-lang/co19#2883) 2024-09-24 sgrekhov22@gmail.com Fixes dart-lang/co19#2877. Catch and ignore exceptions during temp file deletion (dart-lang/co19#2881) 2024-09-24 sgrekhov22@gmail.com Fixes dart-lang/co19#2879. Fix racy code in length_A01_t01.dart (dart-lang/co19#2880) 2024-09-23 sgrekhov22@gmail.com dart-lang/co19#2846. Add unquoted imports tests for keywords (dart-lang/co19#2886) 2024-09-23 sgrekhov22@gmail.com Fixes dart-lang/co19#2887. Fix border type in static_analysis_extension_types_A08_t11.dart (dart-lang/co19#2888) Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try Change-Id: Ibf63f6246db950981a0ee445764f9625bb69a9f0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387161 Reviewed-by: Erik Ernst <eernst@google.com> Commit-Queue: Erik Ernst <eernst@google.com> Reviewed-by: Alexander Thomas <athom@google.com> Commit-Queue: Alexander Thomas <athom@google.com>
No description provided.