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

Implement the Q1 2021 small features release in the CFE #44916

Closed
leafpetersen opened this issue Feb 9, 2021 · 10 comments
Closed

Implement the Q1 2021 small features release in the CFE #44916

leafpetersen opened this issue Feb 9, 2021 · 10 comments
Assignees
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@leafpetersen
Copy link
Member

Implementation issue for this set of features.

See also.

cc @johnniwinther @franklinyow

@leafpetersen leafpetersen added this to the March Beta Release milestone Feb 9, 2021
@franklinyow franklinyow added the area-front-end Use area-front-end for front end / CFE / kernel format related issues. label Feb 10, 2021
dart-bot pushed a commit that referenced this issue Mar 4, 2021
The flag that enables the feature is the 'generic-metadata' experiment
flag.

Bug: #44916
Change-Id: I2770c672280831bf5af6643fde9cb0f1be3083b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188701
Reviewed-by: Johnni Winther <[email protected]>
Commit-Queue: Dmitry Stefantsov <[email protected]>
@leafpetersen
Copy link
Member Author

@stefantsov any updates?

@chloestefantsova
Copy link
Contributor

The support for GFT in type arguments and bounds landed as https://dart-review.googlesource.com/c/sdk/+/188701.

@nshahan
Copy link
Contributor

nshahan commented Mar 16, 2021

@stefantsov @eernstg
I'm seeing compile time errors for the tests that were landed for the Generic Function Types in type arguments and bounds feature. https://dart-ci.firebaseapp.com/current_results/#/filter=language/generic/generic_function_type_argument_test&showAll

Is there an experiment flag we need to turn on at this point?

@leafpetersen
Copy link
Member Author

I think that test is still failing in the front ends.

@eernstg
Copy link
Member

eernstg commented Mar 16, 2021

I think the test language/generic/generic_function_type_argument_test.dart requires that

FB<F> <: F   // That is:
S Function<S extends X Function<X>(X)>(S) <: X Function<X>(X)   // Which is not true.

So the test and the analyzer need to be adjusted.

@crelier
Copy link
Contributor

crelier commented Mar 17, 2021

@stefantsov I'm seeing an error reported by CFE on annotations:

$ out/DebugX64/dart --enable-experiment=generic-metadata tests/language/generic/generic_function_type_argument_test.dart
tests/language/generic/generic_function_type_argument_test.dart:48:2: Error: Type argument 'S Function<S extends T Function<T>(T)>(S)' doesn't conform to the bound 'T Function<T>(T)' of the type variable 'T' on 'CB'.
Try changing type arguments so that they conform to the bounds.
@CB<FB<F>>(fb)
 ^
tests/language/generic/generic_function_type_argument_test.dart:31:10: Context: This is the type variable whose bound isn't conformed to.
class CB<T extends F> {
         ^

@chloestefantsova
Copy link
Contributor

@stefantsov I'm seeing an error reported by CFE on annotations:

I think that error reporting is correct, as @eernstg wrote above. The bound is T Function<T>(T), and the type argument is S Function<S extends T Function<T>(T)>(S). The type parameters in the two have different bounds, so they are incomparable: neither is a subtype of the other, and the error should be reported.

@leafpetersen
Copy link
Member Author

The test needs adjustment. I'll work on getting that done.

@crelier
Copy link
Contributor

crelier commented Mar 17, 2021

I think that error reporting is correct, as @eernstg wrote above.

Sorry, I totally missed Erik's post. My comment was sitting in a draft tab for too long.
Thanks all!

@johnniwinther johnniwinther added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Mar 18, 2021
@leafpetersen
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

7 participants