mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:29:48 +00:00
fd3882091c
Change-Id: I6c936a9ad34befccf1b6775d7c9bdc621995a96f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142280 Reviewed-by: Leaf Petersen <leafp@google.com> Commit-Queue: Bob Nystrom <rnystrom@google.com> Auto-Submit: Bob Nystrom <rnystrom@google.com>
36 lines
748 B
Dart
36 lines
748 B
Dart
// Copyright (c) 2015, 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.
|
|
|
|
// Test that closurizing a function implies a dependency on its type.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
import 'regression_22995_lib.dart' deferred as lib;
|
|
|
|
class A {}
|
|
|
|
class B {}
|
|
|
|
class C {}
|
|
|
|
typedef Ti(int x);
|
|
typedef TB(B x);
|
|
typedef TTi(Ti x);
|
|
typedef Tg<T>(T x);
|
|
|
|
class T {
|
|
fA(A a) => null;
|
|
fTB(TB a) => null;
|
|
fTgC(Tg<C> a) => null;
|
|
}
|
|
|
|
main() {
|
|
Expect.isFalse(new T().fA is Ti);
|
|
Expect.isFalse(new T().fTB is TTi);
|
|
Expect.isFalse(new T().fTgC is TTi);
|
|
lib.loadLibrary().then((_) {
|
|
lib.foofoo();
|
|
});
|
|
}
|