Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(551)

Unified Diff: tests/language/null_is2_test.dart

Issue 16042017: Fix type tests for null. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/null_is2_test.dart
diff --git a/tests/language/call_this_test.dart b/tests/language/null_is2_test.dart
similarity index 55%
copy from tests/language/call_this_test.dart
copy to tests/language/null_is2_test.dart
index 55e7ccd509607ff939e45c328a23ddc0ab023023..1edf139a7866acec23e20ff6e1b857a91890d858 100644
--- a/tests/language/call_this_test.dart
+++ b/tests/language/null_is2_test.dart
@@ -2,17 +2,15 @@
// 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 dart2js treats [:this():] as a closure send.
-
import "package:expect/expect.dart";
-class A {
- call() => 42;
- test1() => this();
- test2() => (this)();
+class Test<T> {
+ foo(a) => a is T;
}
main() {
- Expect.equals(42, (new A()).test1());
- Expect.equals(42, (new A()).test2());
+ 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>);
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698