dart-sdk/tests/language/null_is2_test.dart
karlklose@google.com 6f15041c76 Fix type tests for null.
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
2013-05-30 08:46:25 +00:00

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>);
}