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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java

Issue 23346010: Fix for issue 12569 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/StaticTypeWarningCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java
index e408f11b58dc47fca239b6bef24d83029317cfd3..58a75114c36fe78590f05748eb7b0da582e4218e 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java
@@ -26,20 +26,6 @@ public class StaticTypeWarningCodeTest extends ResolverTestCase {
verify(source);
}
- public void fail_invocationOfNonFunction_staticInSuperclass() throws Exception {
- Source source = addSource(createSource(//
- "class A {",
- " static void a() {}",
- "}",
- "",
- "class B extends A {",
- " void b() { a(); }",
- "}"));
- resolve(source);
- assertErrors(StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION);
- verify(source);
- }
-
public void test_inconsistentMethodInheritance_paramCount() throws Exception {
Source source = addSource(createSource(//
"abstract class A {",
@@ -304,6 +290,16 @@ public class StaticTypeWarningCodeTest extends ResolverTestCase {
verify(source);
}
+ public void test_invocationOfNonFunctionExpression_literal() throws Exception {
+ Source source = addSource(createSource(//
+ "f() {",
+ " 3(5);",
+ "}"));
+ resolve(source);
+ assertErrors(StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION);
+ verify(source);
+ }
+
public void test_nonBoolCondition_conditional() throws Exception {
Source source = addSource(createSource(//
"f() { return 3 ? 2 : 1; }"));

Powered by Google App Engine
This is Rietveld 408576698