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

Unified Diff: tests/compiler/dart2js/simple_inferrer_final_field_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_final_field_test.dart
===================================================================
--- tests/compiler/dart2js/simple_inferrer_final_field_test.dart (revision 23010)
+++ tests/compiler/dart2js/simple_inferrer_final_field_test.dart (working copy)
@@ -34,12 +34,14 @@
checkFieldTypeInClass(String className, String fieldName, type) {
var cls = findElement(compiler, className);
var element = cls.lookupLocalMember(buildSourceString(fieldName));
- Expect.equals(type, typesInferrer.internal.typeOf[element]);
+ Expect.equals(type,
+ typesInferrer.internal.typeOf[element].simplify(compiler));
}
checkFieldTypeInClass('A', 'intField', typesInferrer.intType);
checkFieldTypeInClass('A', 'giveUpField1',
findTypeMask(compiler, 'Interceptor', 'nonNullSubclass'));
- checkFieldTypeInClass('A', 'giveUpField2', typesInferrer.dynamicType);
+ checkFieldTypeInClass('A', 'giveUpField2',
+ typesInferrer.dynamicType.nonNullable());
checkFieldTypeInClass('A', 'fieldParameter', typesInferrer.intType);
}

Powered by Google App Engine
This is Rietveld 408576698