Skip to content

[dev_compiler] Allow compiling this in extension methods during expression compilation for web #46757

Open
@annagrin

Description

@annagrin

Update: VM support has landed, reuse this issue to extend the support to compilation to javascript:

48d8225

VM:
image

dwds:
image

Currently both VM and dwds cannot evaluate this in extension methods.
Not sure about VM, but on the web the problem is a scope mismatch:

  • the scope in kernel contains #this, not this
  • the expression compiled is this, so compilation fails
  • compiling #this also fails because the incremental compiler does not allow # in variables.

Not sure if the solution lies in CFE (changing the name?) or the users of it (adding this to scope?) or both.

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requestarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.type-enhancementA request for a change that isn't a bugweb-dev-compilerweb-evalevaluation support on the web

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions