| Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| index 64ef5cb6e63f4057b7a2af29d18636a2512a2478..bb398ab45d1be39f9fbf33f97ac186939cda3b31 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| @@ -426,8 +426,7 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| * Factory constructor can instantiate any class and return it non-abstract class instance, but
|
| * spec requires warnings, so we provide it, but using different constant.
|
| */
|
| - public void testWarnOnNonVoidSetter()
|
| - throws Exception {
|
| + public void testWarnOnNonVoidSetter() throws Exception {
|
| AnalyzeLibraryResult libraryResult =
|
| analyzeLibrary(
|
| getName(),
|
| @@ -443,4 +442,23 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| errEx(TypeErrorCode.SETTER_RETURN_TYPE, 4, 3, 7),
|
| errEx(TypeErrorCode.SETTER_RETURN_TYPE, 5, 3, 4));
|
| }
|
| +
|
| + /**
|
| + * We should be able to call <code>Function</code> even if it is in the field.
|
| + * <p>
|
| + * http://code.google.com/p/dart/issues/detail?id=933
|
| + */
|
| + public void test_callFunctionFromField() throws Exception {
|
| + AnalyzeLibraryResult libraryResult =
|
| + analyzeLibrary(
|
| + getName(),
|
| + makeCode(
|
| + "class WorkElement {",
|
| + " Function run;",
|
| + "}",
|
| + "foo(WorkElement e) {",
|
| + " e.run();",
|
| + "}"));
|
| + assertErrors(libraryResult.getTypeErrors());
|
| + }
|
| }
|
|
|