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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ElementResolver.java

Issue 241823002: Change UNDEFINED_FUNCTION from an error to a warning (issues 18274, 15315). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ElementResolver.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ElementResolver.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ElementResolver.java
index 638ed65915adaed6e82ae95d67eb4b5c337988b8..5bb5a1359c75c6991eb5a5ed68655e04a60c37ff 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ElementResolver.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ElementResolver.java
@@ -944,9 +944,9 @@ public class ElementResolver extends SimpleAstVisitor<Void> {
StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
methodName,
methodName.getName());
- } else if (errorCode == CompileTimeErrorCode.UNDEFINED_FUNCTION) {
+ } else if (errorCode == StaticTypeWarningCode.UNDEFINED_FUNCTION) {
resolver.reportErrorForNode(
- CompileTimeErrorCode.UNDEFINED_FUNCTION,
+ StaticTypeWarningCode.UNDEFINED_FUNCTION,
methodName,
methodName.getName());
} else if (errorCode == StaticTypeWarningCode.UNDEFINED_METHOD) {
@@ -1420,7 +1420,7 @@ public class ElementResolver extends SimpleAstVisitor<Void> {
if (target == null) {
ClassElement enclosingClass = resolver.getEnclosingClass();
if (enclosingClass == null) {
- return CompileTimeErrorCode.UNDEFINED_FUNCTION;
+ return StaticTypeWarningCode.UNDEFINED_FUNCTION;
} else if (element == null) {
// Proxy-conditional warning, based on state of resolver.getEnclosingClass()
return StaticTypeWarningCode.UNDEFINED_METHOD;
@@ -1437,7 +1437,7 @@ public class ElementResolver extends SimpleAstVisitor<Void> {
targetType = target.getBestType();
}
if (targetType == null) {
- return CompileTimeErrorCode.UNDEFINED_FUNCTION;
+ return StaticTypeWarningCode.UNDEFINED_FUNCTION;
} else if (!targetType.isDynamic() && !targetType.isBottom()) {
// Proxy-conditional warning, based on state of targetType.getElement()
return StaticTypeWarningCode.UNDEFINED_METHOD;

Powered by Google App Engine
This is Rietveld 408576698