mirror of
https://github.com/dart-lang/sdk
synced 2024-09-20 02:50:20 +00:00
6f15041c76
BUG=dartbug.com/10901 R=ngeoffray@google.com Review URL: https://codereview.chromium.org//16042017 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23388 260f80e4-7a28-3924-810f-c04153c831b5
17 lines
485 B
Dart
17 lines
485 B
Dart
// Copyright (c) 2013, 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.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
class Test<T> {
|
|
foo(a) => a is T;
|
|
}
|
|
|
|
main() {
|
|
Expect.isTrue(new Test<Object>().foo(null));
|
|
Expect.isTrue(new Test<dynamic>().foo(null));
|
|
Expect.isFalse(new Test<int>().foo(null));
|
|
Expect.isFalse(null is List<Object>);
|
|
}
|