eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[analyzer] Problems redefining operations on subtypes #507

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 299967 | | Status | CLOSED FIXED | | Importance | P3 normal | | Reported | Jan 18, 2010 12:51 EDT | | Modified | May 29, 2012 13:22 EDT | | Version | 3.0.0 | | Blocks | 318248 | | Reporter | Alexander Igdalov |

Description

helper.setContext(getOCLStandardLibrary().getOclAny());\ helper.defineOperation("foo() : Integer = 1");

helper.setContext(getOCLStandardLibrary().getInteger());\ helper.defineOperation("foo() : Integer = 2");

produces an error:\ Failed to parse or evaluate: Operation (foo()) already defined in type (Integer)

However, if these definitions are exchanged

helper.setContext(getOCLStandardLibrary().getInteger());\ helper.defineOperation("foo() : Integer = 2");

helper.setContext(getOCLStandardLibrary().getOclAny());\ helper.defineOperation("foo() : Integer = 1");

the error is not reported.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Jan 18, 2010 13:16

This also falls within the remit of the revision to use the Standard Library model to drive the overload resolution.

I've just submitted an OMG issue suggesting that features are resolved using the dynamic type (just like Java/C++/...).

We just need to implement it.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Jun 18, 2010 17:01

(In reply to comment #1)

I've just submitted an OMG issue suggesting that features are resolved using the dynamic type (just like Java/C++/...).

Issue 15013.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Feb 01, 2011 02:41

Evaluator now uses dynamic dispatch of the static signature on the complete type derived by amalgamting all influences.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2011 06:40

Resolved for Indigo is 3.1.0 not 3.2.0.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 29, 2012 13:22

Closing all bugs resolved in Indigo.