Files
sdk/pkg/front_end/testcases/nnbd/language_issue1182.dart
T
Johnni Winther d8e4cdd621 [cfe] Handle bounded type variables in extension inference
Handle #43177 for the CFE.

Change-Id: I89f475a6c5dca060b75688fd4c121ab09aed9c4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160524
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-10-13 14:32:28 +00:00

16 lines
385 B
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.
extension Test<T> on T {
T Function(T) get test => (a) => this;
}
class Foo<S extends num> {
void test1(S x) {
S Function(S) f = x.test;
}
}
void main() {}