2018-02-27 10:01:14 +00:00
|
|
|
// Copyright (c) 2018, 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.
|
|
|
|
|
2020-03-21 16:12:36 +00:00
|
|
|
// @dart = 2.7
|
|
|
|
|
2018-02-27 10:01:14 +00:00
|
|
|
import 'package:expect/expect.dart';
|
|
|
|
|
|
|
|
class A {}
|
|
|
|
|
|
|
|
class B implements A {}
|
|
|
|
|
|
|
|
class C<T> {}
|
|
|
|
|
|
|
|
class D {}
|
|
|
|
|
2019-03-05 11:00:17 +00:00
|
|
|
@pragma('dart2js:noInline')
|
2018-02-27 10:01:14 +00:00
|
|
|
m<T>() => new C<T>();
|
|
|
|
|
2019-03-05 11:00:17 +00:00
|
|
|
@pragma('dart2js:noInline')
|
2018-02-27 10:01:14 +00:00
|
|
|
test(o) => o is C<A>;
|
|
|
|
|
|
|
|
main() {
|
|
|
|
Expect.isTrue(test(m<B>()));
|
|
|
|
Expect.isFalse(test(m<D>()));
|
|
|
|
}
|