| Index: compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
|
| index 3e070aa1f30df48360a0addc9deefed8d78b7d1e..d86da206f6d50f323e9c13e2311f611a988340bf 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
|
| @@ -14,6 +14,7 @@ import com.google.dart.compiler.ast.DartBinaryExpression;
|
| import com.google.dart.compiler.ast.DartBooleanLiteral;
|
| import com.google.dart.compiler.ast.DartCascadeExpression;
|
| import com.google.dart.compiler.ast.DartClass;
|
| +import com.google.dart.compiler.ast.DartClassTypeAlias;
|
| import com.google.dart.compiler.ast.DartComment;
|
| import com.google.dart.compiler.ast.DartExprStmt;
|
| import com.google.dart.compiler.ast.DartExpression;
|
| @@ -115,6 +116,33 @@ public class SyntaxTest extends AbstractParserTest {
|
| assertEquals("D", mixins.get(1).toString());
|
| }
|
|
|
| + public void test_parseTypedefMixin() throws Exception {
|
| + parseUnit(
|
| + "test.dart",
|
| + Joiner.on("\n").join(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "typedef C = A with B;",
|
| + ""));
|
| + DartClassTypeAlias typedef = findNode(DartClassTypeAlias.class, "typedef C");
|
| + assertEquals("A", typedef.getSuperclass().toString());
|
| + {
|
| + NodeList<DartTypeNode> mixins = typedef.getMixins();
|
| + assertEquals(1, mixins.size());
|
| + assertEquals("B", mixins.get(0).toString());
|
| + }
|
| + }
|
| +
|
| + public void test_parseTypedefMixin_abstract() throws Exception {
|
| + parseUnit(
|
| + "test.dart",
|
| + Joiner.on("\n").join(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "typedef C = abstract A with B;",
|
| + ""));
|
| + DartClassTypeAlias typedef = findNode(DartClassTypeAlias.class, "typedef C");
|
| + assertTrue(typedef.getModifiers().isAbstract());
|
| + }
|
| +
|
| /**
|
| * <p>
|
| * http://code.google.com/p/dart/issues/detail?id=6881
|
|
|