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

[Class modifiers] The Function class will be final in Dart 3.0 #1874

Closed
lrhn opened this issue Feb 21, 2023 · 6 comments
Closed

[Class modifiers] The Function class will be final in Dart 3.0 #1874

lrhn opened this issue Feb 21, 2023 · 6 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@lrhn
Copy link
Member

lrhn commented Feb 21, 2023

In pre-3.0 code the Function class can be implemented, extended and (probably) mixed in, it's just ignored and has absolutely no effect.
In 3.0 code, the Function class will have a final modifier which prevents all of the above.

The following tests seem to be affected by that (according to a grep):

Language/Expressions/Method_Invocation/Ordinary_Invocation/accessible_instance_member_t07.dart:class A extends Function {
Language/Expressions/Method_Invocation/Ordinary_Invocation/accessible_instance_member_t08.dart:class A extends Function {

If there are more examples (didn't find any implements?) or ones that go through indirections, say something like implements IdAlias<Function> with typedef IdAlias<T> = T;, then they might also need fixing.

@mit-mit
Copy link
Member

mit-mit commented Feb 21, 2023

@sgrekhov sgrekhov self-assigned this Feb 21, 2023
@sgrekhov
Copy link
Contributor

@mit-mit the log is unavailable for me. Could you, please, provide a link to the gerrit CL?

@mit-mit
Copy link
Member

mit-mit commented Feb 21, 2023

@sgrekhov
Copy link
Contributor

Now I see. Thank you!

@sgrekhov
Copy link
Contributor

If you don't mind I'll fix if when CL is landed

sgrekhov added a commit to sgrekhov/co19 that referenced this issue Mar 23, 2023
eernstg pushed a commit that referenced this issue Mar 23, 2023
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Mar 23, 2023
2023-03-23 [email protected] Roll failures fixed (dart-lang/co19#1962)
2023-03-23 [email protected] Fixes dart-lang/co19#1937. Add `@dart=2.19` to class implementing `LinkedHashSet` (dart-lang/co19#1961)
2023-03-23 [email protected] dart-lang/co19#1874. Update LanguageFeatures/nnbd/weak/overriding tests to work with class modifiers (dart-lang/co19#1960)
2023-03-22 [email protected] Minor fixes to execution_pattern_for_in_{element,statement}_A01_t01 (dart-lang/co19#1958)
2023-03-22 [email protected] dart-lang/co19#1401. Tests for invocation keys (dart-lang/co19#1950)
2023-03-22 [email protected] Fixes dart-lang/co19#1951. Don't use fixed port number (dart-lang/co19#1952)
2023-03-22 [email protected] Fixes dart-lang/co19#1955. Use non-matching rest elements in matching_list_A02_t01.dart (dart-lang/co19#1957)
2023-03-22 [email protected] Fixes dart-lang/co19#1940. Add `final` modifier to classes extending `Struct` and `Union` (dart-lang/co19#1956)
2023-03-21 [email protected] Fixes dart-lang/co19#1928. Replace `extends Iterator` by `implements Iterator` (dart-lang/co19#1953)
2023-03-21 [email protected] Fixes dart-lang/co19#1944. Replace `extends StreamSubscription` by `implements StreamSubscription` (dart-lang/co19#1954)
2023-03-20 [email protected] Fixes dart-lang/co19#1946. Duplicated test removed (dart-lang/co19#1948)
2023-03-20 [email protected] Fixes dart-lang/co19#1947. Move nnbd-strong runtime checks in a separate test (dart-lang/co19#1949)
2023-03-20 [email protected] dart-lang/co19#1401. Matching tests for map pattern (dart-lang/co19#1929)
2023-03-17 [email protected] dart-lang/co19#1401. Call insertions tests added (dart-lang/co19#1945)

Change-Id: I27c375f32b02e8bea78562adb58ef5da1b629a45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290764
Reviewed-by: Alexander Thomas <[email protected]>
@sgrekhov sgrekhov added the type-enhancement A request for a change that isn't a bug label Mar 24, 2023
@sgrekhov
Copy link
Contributor

sgrekhov commented May 1, 2023

Fixed by ba5ea0e and cc94e13

@sgrekhov sgrekhov closed this as completed May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants