Files
sdk/pkg/front_end/testcases/none/method_invocation.dart.textual_outline_modelled.expect
T
Johnni Winther 5dbb6e245b [kernel,cfe,ddc] Add new method invocation node to package:kernel
This adds
* InstanceInvocation, DynamicInvocation, FunctionInvocation, and
   LocalFunctionInvocation, EqualsCall, and EqualsNull as a future
   replacement for MethodInvocation.
* InstanceGet, DynamicGet, InstanceTearOff, and FunctionTearOff as a
   future replacement for PropertyGet
* InstanceSet and DynamicSet as a future replacement of PropertySet
* StaticTearOff as an addition to StaticGet

TEST=pkg/front_end/test/binary_md_vm_tags_and_version_test.dart

This CL combines
* https://dart-review.googlesource.com/c/sdk/+/171729
* https://dart-review.googlesource.com/c/sdk/+/172649
* https://dart-review.googlesource.com/c/sdk/+/172650
* https://dart-review.googlesource.com/c/sdk/+/172651

using the initial encoding fo EqualsCall and EqualsNull

Change-Id: I98e020b5f2b405a812663bdcd2c05aba8efa74c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175480
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-12-14 10:55:48 +00:00

44 lines
1.3 KiB
Plaintext

class Class1 {
double method(int o) => 0.5;
}
class Class2<T> {
Class2(this.field, this.nonNullableFunctionField,
this.nonNullableFunctionTypedField);
Function? get nullableFunctionGetter => nonNullableFunctionTypedField;
Function? nullableFunctionField;
Function get nonNullableFunctionGetter => nonNullableFunctionTypedField;
Function nonNullableFunctionField;
T call() => field;
T field;
T method(int o) => field;
void Function()? get nullableFunctionTypedGetter =>
nonNullableFunctionTypedField;
void Function()? nullableFunctionTypedField;
void Function() get nonNullableFunctionTypedGetter =>
nonNullableFunctionTypedField;
void Function() nonNullableFunctionTypedField;
}
const int i = 4;
const int j = 24;
const int k = i * j;
main() {}
test<T1 extends Function, T2 extends int Function(int), T3>(
Class1 nonNullableClass1,
Class1? nullableClass1,
dynamic dyn,
Never never,
Class2<String> nonNullableClass2,
Class2<String>? nullableClass2,
Function nonNullableFunction,
Function? nullableFunction,
int Function(int) nonNullableFunctionType,
int Function(int)? nullableFunctionType,
T Function<T>(T) genericFunctionType,
T1 nonNullableTypeVariable1,
T1? nullableTypeVariable1,
T2 nonNullableTypeVariable2,
T2? nullableTypeVariable2,
T3 undeterminedTypeVariable) {}