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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.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_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
index 79885e77677dcffda1002ce830d37e29cef27a54..ff04727424c51fd7b5efdbbac6c903922febae14 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
@@ -116,24 +116,6 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
verify(source);
}
- public void test_ambiguousImport_function() throws Exception {
- Source source = addSource(createSource(//
- "import 'lib1.dart';",
- "import 'lib2.dart';",
- "g() { return f(); }"));
- addNamedSource("/lib1.dart", createSource(//
- "library lib1;",
- "f() {}"));
- addNamedSource("/lib2.dart", createSource(//
- "library lib2;",
- "f() {}"));
- resolve(source);
- assertErrors(
- source,
- StaticWarningCode.AMBIGUOUS_IMPORT,
- CompileTimeErrorCode.UNDEFINED_FUNCTION);
- }
-
public void test_builtInIdentifierAsMixinName_classTypeAlias() throws Exception {
Source source = addSource(createSource(//
"class A {}",
@@ -3708,36 +3690,6 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
verify(source);
}
- public void test_undefinedFunction() throws Exception {
- Source source = addSource(createSource(//
- "void f() {",
- " g();",
- "}"));
- resolve(source);
- assertErrors(source, CompileTimeErrorCode.UNDEFINED_FUNCTION);
- }
-
- public void test_undefinedFunction_hasImportPrefix() throws Exception {
- Source source = addSource(createSource(//
- "import 'lib.dart' as f;",
- "main() { return f(); }"));
- addNamedSource("/lib.dart", "library lib;");
- resolve(source);
- assertErrors(source, CompileTimeErrorCode.UNDEFINED_FUNCTION);
- }
-
- public void test_undefinedFunction_inCatch() throws Exception {
- Source source = addSource(createSource(//
- "void f() {",
- " try {",
- " } on Object {",
- " g();",
- " }",
- "}"));
- resolve(source);
- assertErrors(source, CompileTimeErrorCode.UNDEFINED_FUNCTION);
- }
-
public void test_undefinedNamedParameter() throws Exception {
Source source = addSource(createSource(//
"class A {",

Powered by Google App Engine
This is Rietveld 408576698