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

Unified Diff: tests/compiler/dart2js/inference/inference_test_helper.dart

Issue 2961313002: Always store GlobalTypeInferenceElementData on the member context (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
« no previous file with comments | « pkg/compiler/lib/src/types/types.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/inference/inference_test_helper.dart
diff --git a/tests/compiler/dart2js/inference/inference_test_helper.dart b/tests/compiler/dart2js/inference/inference_test_helper.dart
index 746babc66c206f614cc7522298e249a940fa79fb..27e8323732ebb52a2bfe2957a7309fb0cffa4a7f 100644
--- a/tests/compiler/dart2js/inference/inference_test_helper.dart
+++ b/tests/compiler/dart2js/inference/inference_test_helper.dart
@@ -40,8 +40,16 @@ class TypeMaskComputer extends AbstractResolvedAstComputer {
@override
String computeElementValue(AstElement element) {
- GlobalTypeInferenceElementResult elementResult =
- results.resultOfElement(element);
+ GlobalTypeInferenceElementResult elementResult;
+ if (element.isParameter) {
+ elementResult = results.resultOfParameter(element);
+ } else if (element.isLocal) {
+ LocalFunctionElement localFunction = element;
+ elementResult = results.resultOfMember(localFunction.callMethod);
+ } else {
+ elementResult = results.resultOfMember(element);
+ }
+
TypeMask value =
element.isFunction ? elementResult.returnType : elementResult.type;
return value != null ? '$value' : null;
« no previous file with comments | « pkg/compiler/lib/src/types/types.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698