Open eclipse-ocl-bot opened 1 month ago
Nov 24, 2020 06:35
New Gerrit change created: https://git.eclipse.org/r/c/ocl/org.eclipse.ocl/+/172739
Nov 24, 2020 07:43
Gerrit change https://git.eclipse.org/r/c/ocl/org.eclipse.ocl/+/172739 was merged to [master].\ Commit: http://git.eclipse.org/c/ocl/org.eclipse.ocl.git/commit/?id=92be38ae903d449410c7fc7ab41780d8942fc409
| --- | --- | | Bugzilla Link | 569113 | | Status | NEW | | Importance | P3 normal | | Reported | Nov 24, 2020 06:27 EDT | | Modified | Nov 24, 2020 07:43 EDT | | See also | Gerrit change 172739, 567919, Git commit 92be38ae | | Reporter | Ed Willink |
Description
While attempting to provide a simple repro for Bug the following 567919
import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/';\ package bug567919a : bug567919a = 'http://bug567919a'\ {\ class MyClass\ {\ attribute eInts : ecore::EInt[*];\ operation sum() : Integer {\ body : eInts->sum();\ }\ }\ }
generates bad code as
@SuppressWarnings("null")\ final /@NonInvalid/ @NonNull List eInts = this.getEInts();\
final /@NonInvalid/ @NonNull SetValue BOXED_eInts = idResolver.createSetOfAll(Bug567919aTables.SET_DATAid_EInt, eInts);
The List should be perhaps List
It appears that
public void JavaStream.appendDeclaration(@NonNull CGValuedElement cgElement) {\ boxedTypeRepresentation.appendDeclaration(cgElement);\ }
ignores the possibility of ecoreTypeRepresemtation for a CGEcorePropertyCallExp. Indeed the EcoreTypeRepresentation seems unused.