Open eclipse-viatra-bot opened 5 months ago
By Oszkar Semerath on Oct 24, 2016 19:02
Note that there is no explicit supertype reference from an EClass to EObject in EMF.
By Zoltan Ujhelyi on Mar 16, 2017 09:52
M2 has passed, postponing all issues.
By Zoltan Ujhelyi on May 15, 2017 16:10
This has missed 1.6; postponing.
By Zoltan Ujhelyi on Oct 04, 2017 05:04
Postponing.
By Zoltan Ujhelyi on Nov 20, 2019 05:51
Postponing issues to the next release.
By Zoltan Ujhelyi on Nov 23, 2020 08:30
Mass postponing of issues to the 2.6 timeframe.
| --- | --- | | Bugzilla Link | 506471 | | Status | UNCONFIRMED | | Importance | P3 normal | | Reported | Oct 24, 2016 18:59 EDT | | Modified | Nov 23, 2020 08:30 EDT | | Version | 1.5.0 | | Reporter | Oszkar Semerath |
Description
The type provider infers incorrect type when dealing with EOBjects.
Example: Let "Model" be an EClass with a reference "containsObject" to any EObjects. In the following example, a pattern "p" collects element pairs that are in containment relation so it lists the possible containment references (like RailwaySystem.elements which contains TrackElements) in different bodies. The problem is that the inferer fails to calculate the common supertype of a class and EObject.
// ✓ a: inferred common supertype of Model and RailwaySystem is EObject\ // × b: inferred common supertype of EObject and Trackelement is TrackElement, but it should be EObject\ pattern p(a,b) {\ Model.containsObject(a,b);\ } or {\ RailwaySystem.elements(a,b);\ }
Similarly, it also fails to infer with non-class types:
// b: Common subtype of EObject and an enum type is EObject, but it should be an error.\ pattern containsSwitchPosition(a,b){\ Model.containsObjects(a,b);\ SwitchState(b); // This is an enum\ }
The minial examle available in:\ https://github.com/OszkarSemerath/bugreports/tree/master/bugreport