aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-01-05 06:24:47 (EST)
committersefftinge2009-01-05 06:24:47 (EST)
commit30d117ac02ab589fab82608f29aa99eb6b4478e5 (patch)
tree1b06e2cd8db42ae0d4a1e59ec1caec8d365f725a
parentde1d4eacb1f961d859e3d31536a4d3e46bd122ff (diff)
downloadorg.eclipse.xtext-30d117ac02ab589fab82608f29aa99eb6b4478e5.zip
org.eclipse.xtext-30d117ac02ab589fab82608f29aa99eb6b4478e5.tar.gz
org.eclipse.xtext-30d117ac02ab589fab82608f29aa99eb6b4478e5.tar.bz2
fix: Don't refuse Xtext2EcoreTransformer#addSuperType if the subtype is sealed but has the supertype that would be added
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Xtext2EcoreTransformerTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Xtext2EcoreTransformerTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Xtext2EcoreTransformerTest.java
index b15109f..62bb0c4 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Xtext2EcoreTransformerTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Xtext2EcoreTransformerTest.java
@@ -798,4 +798,15 @@ public class Xtext2EcoreTransformerTest extends AbstractGeneratorTest {
assertFalse(d instanceof ExceptionDiagnostic);
}
}
+
+ public void testNoException_03() throws Exception {
+ String grammar = "language test import 'http://www.eclipse.org/emf/2002/Ecore' as ecore " +
+ "generate test 'http://test'\n" +
+ "CompositeModel: (type+=EClassifier)+;\n" +
+ "EClassifier returns ecore::EClassifier: EDataType | EClass;\n" +
+ "EClass returns ecore::EClass: 'class' name=ID;\n" +
+ "EDataType returns ecore::EDataType: 'dt' name=ID;";
+ XtextResource resource = getResourceFromString(grammar);
+ assertTrue(resource.getErrors().isEmpty());
+ }
}