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

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

Issue 2955353002: Split inference type-info accessors into members, parameters and local functions (Closed)
Patch Set: Updated cf. comments Created 3 years, 6 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/type_inference8_test.dart
diff --git a/tests/compiler/dart2js/type_inference8_test.dart b/tests/compiler/dart2js/type_inference8_test.dart
index 9ae1752b1668eb90c7bdc222c9530e64508ac26d..e1876354964fd83d98771acb4b867be88b17f29c 100644
--- a/tests/compiler/dart2js/type_inference8_test.dart
+++ b/tests/compiler/dart2js/type_inference8_test.dart
@@ -36,7 +36,7 @@ Future runTest1() {
var typesInferrer = compiler.globalInference.typesInferrerInternal;
var commonMasks = typesInferrer.closedWorld.commonMasks;
var element = findElement(compiler, "foo");
- var mask = typesInferrer.getReturnTypeOfElement(element);
+ var mask = typesInferrer.getReturnTypeOfMember(element);
var falseType =
new ValueTypeMask(commonMasks.boolType, new FalseConstantValue());
// 'foo' should always return false
@@ -44,7 +44,7 @@ Future runTest1() {
// the argument to 'bar' is always false
dynamic bar = findElement(compiler, "bar");
var barArg = bar.parameters.first;
- var barArgMask = typesInferrer.getTypeOfElement(barArg);
+ var barArgMask = typesInferrer.getTypeOfParameter(barArg);
Expect.equals(falseType, barArgMask);
var barCode = compiler.backend.getGeneratedCode(bar);
Expect.isTrue(barCode.contains('"bbb"'));
@@ -79,12 +79,12 @@ Future runTest2() {
var typesInferrer = compiler.globalInference.typesInferrerInternal;
var commonMasks = typesInferrer.closedWorld.commonMasks;
var element = findElement(compiler, "foo");
- var mask = typesInferrer.getReturnTypeOfElement(element);
+ var mask = typesInferrer.getReturnTypeOfMember(element);
// Can't infer value for foo's return type, it could be either true or false
Expect.identical(commonMasks.boolType, mask);
dynamic bar = findElement(compiler, "bar");
var barArg = bar.parameters.first;
- var barArgMask = typesInferrer.getTypeOfElement(barArg);
+ var barArgMask = typesInferrer.getTypeOfParameter(barArg);
// The argument to bar should have the same type as the return type of foo
Expect.identical(commonMasks.boolType, barArgMask);
var barCode = compiler.backend.getGeneratedCode(bar);
« no previous file with comments | « tests/compiler/dart2js/type_inference7_test.dart ('k') | tests/compiler/dart2js/type_inference_switch_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698