Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit ad5fc84

Browse files
osa1Commit Queue
authored andcommitted
[dart2wasm] Implement function tear-offs
New passing tests: - co19/LanguageFeatures/Constructor-tear-offs/call_method_A01_t01 - co19/LanguageFeatures/Constructor-tear-offs/call_method_A01_t02 - co19/LanguageFeatures/Constructor-tear-offs/call_method_A02_t01 - co19/LanguageFeatures/Constructor-tear-offs/call_method_A02_t02 - co19/LanguageFeatures/Constructor-tear-offs/call_method_A02_t03 - co19/LanguageFeatures/Constructor-tear-offs/call_method_A02_t07 - co19/LanguageFeatures/Constructor-tear-offs/call_method_A03_t01 - co19/LanguageFeatures/Constructor-tear-offs/call_method_A04_t02 - co19/LanguageFeatures/Constructor-tear-offs/syntax_A03_t01 - language/call/method_function_typed_value_test/02 - language/call/method_function_typed_value_test/04 - language/call/method_function_typed_value_test/06 - language/generic/generic_function_type_argument_test Change-Id: I247a6fc70e707339315a780040f344e89ac78005 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267320 Commit-Queue: Ömer Ağacan <[email protected]> Reviewed-by: Aske Simon Christensen <[email protected]>
1 parent 5baa4af commit ad5fc84

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/dart2wasm/lib/code_generator.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,6 +1908,11 @@ class CodeGenerator extends ExpressionVisitor1<w.ValueType, w.ValueType>
19081908
}
19091909
}
19101910

1911+
@override
1912+
w.ValueType visitFunctionTearOff(
1913+
FunctionTearOff node, w.ValueType expectedType) =>
1914+
wrap(node.receiver, expectedType);
1915+
19111916
@override
19121917
w.ValueType visitInstanceTearOff(
19131918
InstanceTearOff node, w.ValueType expectedType) {

0 commit comments

Comments
 (0)