eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

OperationCallExp arguments_conform constraint looks up operation #291

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 236247 | | Status | CLOSED FIXED | | Importance | P2 normal | | Reported | Jun 09, 2008 10:36 EDT | | Modified | May 27, 2011 02:42 EDT | | Version | 1.2.0 | | Depends on | 232028 | | Reporter | Christian Damus |

Description

This is a clone of bug 232028 which has now been used to resolve a regression caused by the original resolution of this problem.

In the 1.3 release, the implementation of the arguments_conform constraint on OperationCallExp should be reworked to accurately check the type conformance of the arguments and parameters, without resorting (as did the ValidationVisitor) to looking up the called operation again in the model.

The conformance check will have to account for:

which resolution depends on the source type of the operation call expression.

eclipse-ocl-bot commented 1 month ago

By Adolfo Sanchez-Barbudo Herrera on Dec 01, 2008 12:14

Created attachment 119175 Test Case

Test case recovered from bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=232028, which includes the case where a generic collection is returned by an OCL Expression. It might be useful since it exposes the bad behaviour of the previous erroneous patch.

The patch comes soon.

:notepad_spiral: ocl236247textCase.txt

eclipse-ocl-bot commented 1 month ago

By Adolfo Sanchez-Barbudo Herrera on Dec 01, 2008 12:59

Created attachment 119180 Fixing patch

The proposed patch makes use of the TypeUtil.matchArgs API method, which takes care of the resolution of generic types when needed.

Ecore and UML test cases pass. Mine do pass as well.

:notepad_spiral: ocl236247.txt

eclipse-ocl-bot commented 1 month ago

By Christian Damus on Dec 02, 2008 07:12

Patches committed to HEAD (1.3 branch).

Thanks, Adolfo! Nice work. Including a new test case and copyright headers!

eclipse-ocl-bot commented 1 month ago

By Christian Damus on Dec 04, 2008 10:35

Fix available in HEAD: 1.3.0.I200812021600.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2011 02:40

Closing after over a year in verified state.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2011 02:42

Closing after over a year in verified state.