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

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

Issue 2577423002: Further reduce use of Compiler.closedWorld. (Closed)
Patch Set: Created 4 years 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 | « tests/compiler/dart2js/subtypeset_test.dart ('k') | tests/compiler/dart2js/type_combination_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/trust_type_annotations_test.dart
diff --git a/tests/compiler/dart2js/trust_type_annotations_test.dart b/tests/compiler/dart2js/trust_type_annotations_test.dart
index 764e5ef6ad455493a1bbb826ef7b16fb53d08b89..70fb5f199315c15ffc7b64c69695ac8270d1f1c4 100644
--- a/tests/compiler/dart2js/trust_type_annotations_test.dart
+++ b/tests/compiler/dart2js/trust_type_annotations_test.dart
@@ -51,6 +51,7 @@ void main() {
var compiler = compilerFor(TEST, uri, trustTypeAnnotations: true);
asyncTest(() => compiler.run(uri).then((_) {
var typesInferrer = compiler.globalInference.typesInferrerInternal;
+ var closedWorld = typesInferrer.closedWorld;
ClassElement classA = findElement(compiler, "A");
@@ -58,18 +59,17 @@ void main() {
var element = classA.lookupMember(name);
var mask = typesInferrer.getReturnTypeOfElement(element);
Expect.isTrue(type.containsMask(
- typesInferrer.getReturnTypeOfElement(element),
- compiler.closedWorld));
+ typesInferrer.getReturnTypeOfElement(element), closedWorld));
}
checkType(String name, type) {
var element = classA.lookupMember(name);
Expect.isTrue(type.containsMask(
- typesInferrer.getTypeOfElement(element), compiler.closedWorld));
+ typesInferrer.getTypeOfElement(element), closedWorld));
}
- var intMask = new TypeMask.subtype(
- compiler.coreClasses.intClass, compiler.closedWorld);
+ var intMask =
+ new TypeMask.subtype(compiler.coreClasses.intClass, closedWorld);
checkReturn('foo', intMask);
checkReturn('faa', intMask);
« no previous file with comments | « tests/compiler/dart2js/subtypeset_test.dart ('k') | tests/compiler/dart2js/type_combination_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698