Files
sdk/pkg/front_end/test/covariance_check/data/field.dart
T
Johnni Winther 137c7b6c84 [cfe] Explicitly run front_end unittest without non-nullable
This prepares front_end unittests for turning on non-nullable by default.

Change-Id: I9588a2d026ab9f5b1dcf08a140d25bd5dca3d5bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168346
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-20 13:13:33 +00:00

43 lines
1.1 KiB
Dart

// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.9
class Class<T> {
T direct;
void Function(T) functionArgument;
T Function() functionReturn;
T Function(T) functionArgumentReturn;
void method(Class<T> other) {
direct;
this.direct;
other.direct;
functionArgument;
this.functionArgument;
other. /*as: void Function(T)*/ functionArgument;
functionArgument(null);
this.functionArgument(null);
other. /*as: void Function(T)*/ functionArgument(null);
functionReturn;
this.functionReturn;
other.functionReturn;
functionReturn();
this.functionReturn();
other.functionReturn();
functionArgumentReturn;
this.functionArgumentReturn;
other. /*as: T Function(T)*/ functionArgumentReturn;
functionArgumentReturn(null);
this.functionArgumentReturn(null);
other. /*as: T Function(T)*/ functionArgumentReturn(null);
}
}