Skip to content

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

Closed
@lrhn

Description

@lrhn

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.

Metadata

Metadata

Assignees

Labels

type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions