eclipse-qvto / org.eclipse.qvto

Eclipse Public License 2.0
0 stars 1 forks source link

Compiler should report error for Model::createEmptyModel() call #505

Open eclipse-qvt-oml-bot opened 4 days ago

eclipse-qvt-oml-bot commented 4 days ago

| --- | --- | | Bugzilla Link | 295170 | | Status | NEW | | Importance | P3 normal | | Reported | Nov 14, 2009 15:17 EDT | | Modified | Dec 05, 2013 03:00 EDT | | Version | 2.0 | | Reporter | Radomil Dvorak |

Description

Should not allow to create sort of abstract model type.\ The following exception is raised at runtime.

java.lang.IllegalArgumentException\ at org.eclipse.m2m.internal.qvt.oml.stdlib.ModelOperations$6.invoke(ModelOperations.java:146)\ at org.eclipse.m2m.internal.qvt.oml.ast.env.QvtOperationalEvaluationEnv.callOperation(QvtOperationalEvaluationEnv.java:155)\ at org.eclipse.ocl.ecore.EcoreEvaluationEnvironment.callOperation(EcoreEvaluationEnvironment.java:1)\ at org.eclipse.ocl.EvaluationVisitorImpl.visitOperationCallExp(EvaluationVisitorImpl.java:192)\ at org.eclipse.m2m.internal.qvt.oml.evaluator.QvtOperationalEvaluationVisitorImpl.doVisitOperationCallExp(QvtOperationalEvaluationVisitorImpl.java:649)\ at org.eclipse.m2m.internal.qvt.oml.evaluator.QvtOperationalEvaluationVisitorImpl.visitOperationCallExp(QvtOperationalEvaluationVisitorImpl.java:602)\ at org.eclipse.ocl.EvaluationVisitorDecorator.visitOperationCallExp(EvaluationVisitorDecorator.java:269)\ at org.eclipse.m2m.internal.qvt.oml.evaluator.QvtGenericEvaluationVisitor.visitOperationCallExp(QvtGenericEvaluationVisitor.java:265)\ at org.eclipse.ocl.ecore.impl.OperationCallExpImpl.accept(OperationCallExpImpl.java:399)

eclipse-qvt-oml-bot commented 4 days ago

By Sergey Boyko on Dec 05, 2013 03:00

Next snippet leads to the mentioned exception:

var emptyModel : Model := Model.createEmptyModel();