Skip to content

breaking-change-request: ParameterMirror for abstract functions will not provide the default values for optional parameters #38464

@a-siva

Description

@a-siva

FunctionTypeMirror objects allow reflecting on a function. This object has a method 'parameters' which returns a list of the parameter types of the reflectee. The ParameterMirror object in turn allows reflecting on the formal parameter declaration.

Currently it is possible to reflect on abstract methods and it's formal parameter declaration.

Planned Change

We will not support reflecting on the default parameter values of optional parameters specified on the formal parameter declaration of an abstract method.
defaultValue will always return a Null object
hasDefaultValue will return false

Expected Impact

We expect the impact to be low because of this change as dart2js and flutter do not support dart:mirrors. In addition we always state that the dart:mirrors library is unstable and its API might change.

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.breaking-change-requestThis tracks requests for feedback on breaking changes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions