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

Unified Diff: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart

Issue 1149403009: Refactoring resolution of local access and unqualified access of statics (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix after rebase Created 5 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/helpers/trace.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index 59372ca77ff9d2472237078b085a1247d12ebb86..7a705ddea7d0bbab16933d5344bae2606b1cbbd9 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -1696,6 +1696,26 @@ class SimpleTypeInferrerVisitor<T>
}
@override
+ T visitStaticSetterInvoke(
+ ast.Send node,
+ MethodElement setter,
+ ast.NodeList arguments,
+ CallStructure callStructure,
+ _) {
+ return handleInvalidStaticInvoke(node);
+ }
+
+ @override
+ T visitTopLevelSetterInvoke(
+ ast.Send node,
+ MethodElement setter,
+ ast.NodeList arguments,
+ CallStructure callStructure,
+ _) {
+ return handleInvalidStaticInvoke(node);
+ }
+
+ @override
T visitUnresolvedInvoke(
ast.Send node,
Element element,
@@ -1871,6 +1891,22 @@ class SimpleTypeInferrerVisitor<T>
}
@override
+ T visitStaticSetterGet(
+ ast.Send node,
+ MethodElement setter,
+ _) {
+ return types.dynamicType;
+ }
+
+ @override
+ T visitTopLevelSetterGet(
+ ast.Send node,
+ MethodElement setter,
+ _) {
+ return types.dynamicType;
+ }
+
+ @override
T visitUnresolvedGet(
ast.Send node,
Element element,
@@ -1935,7 +1971,6 @@ class SimpleTypeInferrerVisitor<T>
_) {
ArgumentsTypes argumentTypes = analyzeArguments(node.arguments);
Selector selector = elements.getSelector(node);
- if (!selector.applies(function, compiler.world)) return types.dynamicType;
// This only works for function statements. We need a
// more sophisticated type system with function types to support
// more.
@@ -1944,6 +1979,17 @@ class SimpleTypeInferrerVisitor<T>
sideEffects, inLoop);
}
+ @override
+ T visitLocalFunctionIncompatibleInvoke(
+ ast.Send node,
+ LocalFunctionElement function,
+ ast.NodeList arguments,
+ CallStructure callStructure,
+ _) {
+ analyzeArguments(node.arguments);
+ return types.dynamicType;
+ }
+
T handleStaticSend(ast.Node node,
Selector selector,
Element element,
« no previous file with comments | « pkg/compiler/lib/src/helpers/trace.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698