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

Fix #2485. Updateas and is expressions tests with a function type #2538

Merged
merged 3 commits into from
Feb 12, 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.

We might as well preserve the test cases and just fix the syntax error (I don't think there's a reason to drop the test itself, we just have to write it in a slightly different way).

///
/// @description Checks that any other token following the ambiguous > will make
/// the prior tokens be parsed as comma separated < and > operator invocations.
/// Test `as`, `as!` and `is` tokens
Copy link
Member

Choose a reason for hiding this comment

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

We can't promise that the prior tokens are parsed as anything specific (the parse might very well just fail entirely), we can only promise that they will not be parsed as a <postfixExpression> of the form <primary> <selector>* <typeArguments>.

In each specific case we may then determine that some other parse will succeed, or the term is a syntax error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Description updated and more cases added

Copy link
Contributor Author

@sgrekhov sgrekhov left a comment

Choose a reason for hiding this comment

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

Updated. Please take another look

///
/// @description Checks that any other token following the ambiguous > will make
/// the prior tokens be parsed as comma separated < and > operator invocations.
/// Test `as`, `as!` and `is` tokens
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Description updated and more cases added

Remove 2nd copy of spuriously duplicated line.
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

@eernstg eernstg merged commit d778452 into dart-lang:master Feb 12, 2024
2 checks passed
sgrekhov added a commit to sgrekhov/co19 that referenced this pull request Feb 15, 2024
…tion type (dart-lang#2538)

Update`as` and `is` expressions tests with a function type
sgrekhov added a commit to sgrekhov/co19 that referenced this pull request Feb 15, 2024
…tion type (dart-lang#2538)

Update`as` and `is` expressions tests with a function type
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Feb 21, 2024
2024-02-20 sgrekhov22@gmail.com dart-lang/co19#2496. Add missing part file (dart-lang/co19#2552)
2024-02-20 sgrekhov22@gmail.com dart-lang/co19#2549. Update built-in identifier tests. Add missing ones. Part 2 (dart-lang/co19#2551)
2024-02-20 sgrekhov22@gmail.com dart-lang/co19#2549. Update built-in identifier tests. Add missing ones. Part 1 (dart-lang/co19#2550)
2024-02-19 sgrekhov22@gmail.com Fix dart-lang/co19#2546. Add constant context tests (dart-lang/co19#2547)
2024-02-15 sgrekhov22@gmail.com Fixes dart-lang/co19#2496. Fix co19 tests that became failing after test runner update (dart-lang/co19#2497)
2024-02-14 sgrekhov22@gmail.com dart-lang/co19#1400. Add cascade operator test and more constants tests (dart-lang/co19#2545)
2024-02-14 sgrekhov22@gmail.com dart-lang/co19#2350. Add more factory constructor tests (dart-lang/co19#2543)
2024-02-14 sgrekhov22@gmail.com dart-lang/co19#1400. Add representation variable initialization test (dart-lang/co19#2544)
2024-02-13 sgrekhov22@gmail.com dart-lang/co19#2119. Remove unsupported element from Stream.first/lastWhere tests description (dart-lang/co19#2540)
2024-02-13 sgrekhov22@gmail.com dart-lang/co19#2119. Remove unsupported element from ReceivePort.first/lastWhere tests description (dart-lang/co19#2541)
2024-02-13 sgrekhov22@gmail.com dart-lang/co19#2339. Add more tests for the extension method with the name `type` (dart-lang/co19#2542)
2024-02-12 sgrekhov22@gmail.com Fix dart-lang/co19#2535. Add patterns constants tests for extension types (dart-lang/co19#2539)
2024-02-12 sgrekhov22@gmail.com Fix dart-lang/co19#2485. Update`as` and `is` expressions tests with a function type (dart-lang/co19#2538)
2024-02-12 sgrekhov22@gmail.com Fix dart-lang/co19#2536. Fix use of HINT.UNREACHABLE_SWITCH_CASE (dart-lang/co19#2537)
2024-02-09 sgrekhov22@gmail.com dart-lang/co19#2119. Remove unused code, add issues numbers (dart-lang/co19#2534)
2024-02-09 sgrekhov22@gmail.com dart-lang/co19#2529. Fix failing API core tests (dart-lang/co19#2533)
2024-02-09 sgrekhov22@gmail.com dart-lang/co19#2529. Delete API tests with compile-time errors (dart-lang/co19#2531)
2024-02-09 sgrekhov22@gmail.com dart-lang/co19#2529. Fix and enable Iterable/forEach_A03_t01 (dart-lang/co19#2532)

Change-Id: I03e721d3871d5bf2b9773fbf7ebadb2a1804a111
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353260
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: 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.

None yet

2 participants