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

Unified Diff: tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart

Issue 14997006: Introduce a UnionTypeMask, currently limited to 4 types. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
Index: tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart
===================================================================
--- tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart (revision 23010)
+++ tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart (working copy)
@@ -71,7 +71,7 @@
test8() => new C().bar();
test9() => (a ? new B() : new C()).bar();
-// Can hit A.noSuchMethod, D.noSuchMethod and Object.noSuchMethod.
+// Can hit A.noSuchMethod and D.noSuchMethod.
test10() => (a ? new B() : new D()).bar();
// Can hit D.noSuchMethod.
@@ -101,15 +101,18 @@
checkReturn(String name, type) {
var element = findElement(compiler, name);
- Expect.equals(type, typesInferrer.internal.returnTypeOf[element], name);
+ Expect.equals(
+ type,
+ typesInferrer.internal.returnTypeOf[element].simplify(compiler),
+ name);
}
checkReturn('test1', typesInferrer.intType);
checkReturn('test2', typesInferrer.dynamicType);
checkReturn('test3', typesInferrer.intType);
checkReturn('test4', typesInferrer.mapType);
- checkReturn('test5', typesInferrer.dynamicType);
- checkReturn('test6', typesInferrer.dynamicType);
+ checkReturn('test5', typesInferrer.dynamicType.nonNullable());
+ checkReturn('test6', typesInferrer.dynamicType.nonNullable());
compiler = compilerFor(TEST2, uri);
compiler.runCompiler(uri);
@@ -129,6 +132,6 @@
checkReturn('test7', typesInferrer.intType);
checkReturn('test8', typesInferrer.intType);
checkReturn('test9', typesInferrer.intType);
- checkReturn('test10', typesInferrer.numType.nullable());
+ checkReturn('test10', typesInferrer.numType);
checkReturn('test11', typesInferrer.doubleType);
}

Powered by Google App Engine
This is Rietveld 408576698