Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl
index 1035f50b8..e3d7cb5e7 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl
+++ b/plugins/org.eclipse.qvtd.pivot.qvtimperative/model/QVTimperative.ocl
@@ -31,9 +31,6 @@ def: referringNames : Set(String) = binding.boundVariable.name->asSet()
inv MatchingCallBindings('Mismatched bindings ' + referredMapping.name + joinNames(referredNames) + ' <= ' + joinNames(referringNames)): referredNames = referringNames
inv UniqueCallBindings: binding->isUnique(boundVariable)
-context GuardParameterBinding
-inv CompatibleBinding: value.type.conformsTo(boundVariable.type) or boundVariable.type.conformsTo(value.type)
-
endpackage
package qvtimperative
@@ -66,8 +63,9 @@ inv NoRealizedVariableNavigations: ownedExpression->closure(oclContents())->sele
-- if mapping.isToMiddle then area = mapping else area.oclAsType(CoreDomain).isEnforceable endif
context GuardParameterBinding
-inv CheckedTypeIsNotConformant: isCheck implies not value.type.conformsTo(boundVariable.type)
-inv UncheckedTypeIsConformant: not isCheck implies value.type.conformsTo(boundVariable.type)
+inv CheckedTypeIsNotConformant: isCheck implies let elementType = value.type.oclAsType(ocl::CollectionType).elementType in not elementType.conformsTo(boundVariable.type)
+inv UncheckedTypeIsConformant: not isCheck implies let elementType = value.type.oclAsType(ocl::CollectionType).elementType in elementType.conformsTo(boundVariable.type)
+inv CompatibleBinding: let elementType = value.type.oclAsType(ocl::CollectionType).elementType in elementType.conformsTo(boundVariable.type) or boundVariable.type.conformsTo(elementType)
context SimpleParameterBinding
inv CheckedTypeIsNotConformant: isCheck implies not value.type.conformsTo(boundVariable.type)

Back to the top