Skip to content

Invocations of callable classes should be desugared in Kernel #34497

Open
@mraleph

Description

@mraleph

For simplicity of the backends I would expect that the method Something.invoke below would be represented in the Kernel AST as (this.delegate).call(value). However currently it is represented as a method invocation of this.delegate(value) instead.

class Callable<T> {
  void call(T value) {} 
}

class Something<T> {
  Callable<T> delegate;
 
  void invoke(T value) { delegate(value); }
}

For simplicity on the backend site

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onlegacy-area-front-endLegacy: Use area-dart-model instead.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