| 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 886e205061d4a79a1771409b1c39eb3b09e284b4..adfb755be4b4a7e47a7fe66efaa76e8276ae462c 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| @@ -31,12 +31,15 @@ import com.google.dart.compiler.ast.DartMethodInvocation;
|
| import com.google.dart.compiler.ast.DartNewExpression;
|
| import com.google.dart.compiler.ast.DartNode;
|
| import com.google.dart.compiler.ast.DartPropertyAccess;
|
| +import com.google.dart.compiler.ast.DartSuperConstructorInvocation;
|
| import com.google.dart.compiler.ast.DartTypeNode;
|
| import com.google.dart.compiler.ast.DartUnaryExpression;
|
| import com.google.dart.compiler.ast.DartUnit;
|
| import com.google.dart.compiler.ast.DartUnqualifiedInvocation;
|
| import com.google.dart.compiler.parser.ParserErrorCode;
|
| import com.google.dart.compiler.resolver.ClassElement;
|
| +import com.google.dart.compiler.resolver.ConstructorElement;
|
| +import com.google.dart.compiler.resolver.ConstructorNodeElement;
|
| import com.google.dart.compiler.resolver.Element;
|
| import com.google.dart.compiler.resolver.ElementKind;
|
| import com.google.dart.compiler.resolver.EnclosingElement;
|
| @@ -6133,4 +6136,24 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| assertEquals(3, error.getColumnNumber());
|
| }
|
| }
|
| +
|
| + /**
|
| + * Test that we set {@link ConstructorElement} for {@link DartSuperConstructorInvocation}.
|
| + */
|
| + public void test_superConstructorInvocation_resolveElement() throws Exception {
|
| + analyzeLibrary(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "abstract class A {",
|
| + " A.named() {}",
|
| + "}",
|
| + "abstract class B extends A {",
|
| + " B() : super.named();",
|
| + "}",
|
| + "");
|
| + DartIdentifier nameInInvocation = findNode(DartIdentifier.class, "named();");
|
| + DartSuperConstructorInvocation invocation = (DartSuperConstructorInvocation) nameInInvocation.getParent();
|
| + ConstructorNodeElement expectedElement = invocation.getElement();
|
| + assertNotNull(expectedElement);
|
| + assertSame(nameInInvocation.getElement(), expectedElement);
|
| + }
|
| }
|
|
|