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

#2339. Add test for extension named type and a record type #2366

Merged
merged 2 commits into from
Nov 10, 2023

Conversation

sgrekhov
Copy link
Contributor

We have an interesting case here.
Without // SharedOptions=--enable-experiment=inline-class experimental flag extension type on (int i,) should be treated as an extension named type on record type (int,).
With // SharedOptions=--enable-experiment=inline-class it became an extension type with a excesive comma after the representation type.

So, we may have two tests here

extension type on 
//        ^^^^
// [analyzer] unspecified
// [cfe] unspecified
    (int i,) {}

And

// SharedOptions=--enable-experiment=inline-class
extension type on
    (int i,) {}
//        ^
// [analyzer] unspecified
// [cfe] unspecified

But the first one became an invalid when the extension types will stop to be an experiment but became the part of the language. So I added only the one tests expecting an error in the right place when the extension types will be shipped. If you believe that we have more tests here, then let me know

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, the addition of only this case is fine!

@eernstg eernstg merged commit 36f6ee9 into dart-lang:master Nov 10, 2023
1 of 2 checks passed
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Nov 17, 2023
2023-11-17 sgrekhov22@gmail.com Fixes dart-lang/co19#2381. Fix roll failures (dart-lang/co19#2382)
2023-11-16 sgrekhov22@gmail.com Fixes dart-lang/co19#2379. Update expected error position for CFE (dart-lang/co19#2380)
2023-11-16 sgrekhov22@gmail.com Fixes dart-lang/co19#2377. Add missing Float32x4List.setAll_A04_t01 test (dart-lang/co19#2378)
2023-11-16 sgrekhov22@gmail.com Fixes dart-lang/co19#2373. Expect additional errors in CFE for member conflicts tests (dart-lang/co19#2375)
2023-11-16 sgrekhov22@gmail.com dart-lang/co19#2359. Fix existing extension types tests according to the new nullability rules (dart-lang/co19#2372)
2023-11-16 sgrekhov22@gmail.com Fixes dart-lang/co19#2356. Fix nullability in dynamic_semantics_member_invocation_A03_t02.dart (dart-lang/co19#2368)
2023-11-16 sgrekhov22@gmail.com dart-lang/co19#2371. Add tests for factory constructor generating an enum value (dart-lang/co19#2376)
2023-11-15 sgrekhov22@gmail.com dart-lang/co19#2371. Add missing enhanced enums tests, update assertions (dart-lang/co19#2374)
2023-11-14 sgrekhov22@gmail.com Fixes dart-lang/co19#2369. Static type of == operator is always bool (dart-lang/co19#2370)
2023-11-14 sgrekhov22@gmail.com dart-lang/co19#2303. Add more File.create()/createSync() tests (dart-lang/co19#2337)
2023-11-10 sgrekhov22@gmail.com dart-lang/co19#2339. Add test for extension named type and a record type (dart-lang/co19#2366)

Change-Id: If608421c5a4f614187a66dc05fa5d8d90c9e363d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336901
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
@sgrekhov sgrekhov deleted the co19-2339-2 branch January 10, 2024 08:02
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