diff --git a/plugins/org.eclipse.epsilon.eol.staticanalyser.tests/src/org/eclipse/epsilon/eol/staticanalyser/tests/scripts/propertyAssignment.eol b/plugins/org.eclipse.epsilon.eol.staticanalyser.tests/src/org/eclipse/epsilon/eol/staticanalyser/tests/scripts/propertyAssignment.eol new file mode 100644 index 000000000..3d11ced46 --- /dev/null +++ b/plugins/org.eclipse.epsilon.eol.staticanalyser.tests/src/org/eclipse/epsilon/eol/staticanalyser/tests/scripts/propertyAssignment.eol @@ -0,0 +1,19 @@ +model M driver EMF {nsuri="http://www.eclipse.org/emf/2002/Ecore"}; + +var p : EPackage; +var c : EClass; + +p = c.ePackage; +c = p.eClassifiers.op1(); +c = p.eClassifiers.op2(); + +operation Any op1() : EClass { + // If I comment out the following line I get a "_NOTYPE cannot be assigned to EClass" error which doesn't look right + return new EClass; + // If I comment out the line above and uncomment the line below, I also get a "_NOTYPE cannot be assigned to EClass" error + // return self.op1(); +} + +operation Collection op2() : EClass { + return new EClass; +} \ No newline at end of file