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

Side by Side Diff: tests/compiler/dart2js/simple_inferrer_closure_test.dart

Issue 2314703002: Split World usage into open, inference, and closed world. (Closed)
Patch Set: Updated cf. comments. Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 import "package:async_helper/async_helper.dart"; 6 import "package:async_helper/async_helper.dart";
7 import 'compiler_helper.dart'; 7 import 'compiler_helper.dart';
8 import 'type_mask_test_helper.dart'; 8 import 'type_mask_test_helper.dart';
9 9
10 const String TEST = """ 10 const String TEST = """
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 checkReturn('returnNum1', compiler.commonMasks.numType); 140 checkReturn('returnNum1', compiler.commonMasks.numType);
141 141
142 checkReturnInClass(String className, String methodName, type) { 142 checkReturnInClass(String className, String methodName, type) {
143 var cls = findElement(compiler, className); 143 var cls = findElement(compiler, className);
144 var element = cls.lookupLocalMember(methodName); 144 var element = cls.lookupLocalMember(methodName);
145 Expect.equals(type, 145 Expect.equals(type,
146 simplify(typesInferrer.getReturnTypeOfElement(element), compiler)); 146 simplify(typesInferrer.getReturnTypeOfElement(element), compiler));
147 } 147 }
148 var cls = findElement(compiler, 'A'); 148 var cls = findElement(compiler, 'A');
149 checkReturnInClass('A', 'foo', new TypeMask.nonNullExact(cls, 149 checkReturnInClass('A', 'foo', new TypeMask.nonNullExact(cls,
150 compiler.world)); 150 compiler.closedWorld));
151 })); 151 }));
152 } 152 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698