Type of variable in "let" not agreeing with oclIsTypeOf/oclAsType [message #650539] |
Tue, 25 January 2011 08:31  |
Eclipse User |
|
|
|
While playing with my UML model and the interactive OCL console. Both OCL-functions convince me that I'm looking at a uml::Interface, but if I try to assign it to a variable of the same time in a let, it doesn't type-check. What am I missing? Platform is Helios-SR1 with feature OCL 3.0.1 and feature OCL for UML 3.0.0.
Evaluating:
self.supplier.getValue(self.supplier.getAppliedStereotype('r COS::ContractInterface')- >any(true),'interface').oclIsTypeOf(uml::Interface)
Results:
true
Evaluating:
self.supplier.getValue(self.supplier.getAppliedStereotype('r COS::ContractInterface')- >any(true),'interface').oclAsType(uml::Interface)
Results:
<Interface> Interface_From_Clock
Evaluating:
let i : uml::Interface = self.supplier.getValue(self.supplier.getAppliedStereotype('r COS::ContractInterface')- >any(true),'interface').oclAsType(uml::Interface) in i
Results:
Init expression type does not conform to type of variable (i).
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05608 seconds