| 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 8f497e6ef2c26896b737806ea1ad6d7446eb23de..8d33f64c50d93187e52d586d03912938e2b38368 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| @@ -4196,6 +4196,29 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| errEx(ResolverErrorCode.REDIRECTION_CONSTRUCTOR_TARGET_MUST_BE_CONST, 7, 29, 5));
|
| }
|
|
|
| + /**
|
| + * <p>
|
| + * http://code.google.com/p/dart/issues/detail?id=4778
|
| + */
|
| + public void test_unqualifiedAccessToGenericTypeField() throws Exception {
|
| + AnalyzeLibraryResult libraryResult = analyzeLibrary(makeCode(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "class Game {}",
|
| + "class GameRenderer<G extends Game> {",
|
| + " G get game => null;",
|
| + "}",
|
| + "class SpaceShooterGame extends Game {",
|
| + " int score;",
|
| + "}",
|
| + "class SpaceShooterRenderer extends GameRenderer<SpaceShooterGame> {",
|
| + " someMethod() {",
|
| + " var a = game.score;",
|
| + " }",
|
| + "}",
|
| + ""));
|
| + assertErrors(libraryResult.getErrors());
|
| + }
|
| +
|
| private <T extends DartNode> T findNode(final Class<T> clazz, String pattern) {
|
| final int index = testSource.indexOf(pattern);
|
| assertTrue(index != -1);
|
|
|