Skip to content

Desugar expression evaluation function when expression evaluation happens inside an extension/extension type member #62144

@alexmarkov

Description

@alexmarkov

Context: https://dart-review.googlesource.com/c/sdk/+/464740

When expression is evaluated inside an extension/extension type member, CFE creates a non-static expression evaluation function without a class (in a library scope). This looks like an incorrect AST. Also, it is not clear what happens with type parameters which are passed separately.

Expression evaluation function should be at least marked static. Also, it should receive its "class" type parameters as function type arguments. This can be probably achieved by applying the same desugaring which is applied to instance members of extensions and extension types.

@johnniwinther @jensjoha @sstrickl

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.cfe-expression-compilationIssues related to expression compilation in the CFE

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions