Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2016-09-22 20:40:55 +0000
committerEd Willink2016-10-30 11:36:22 +0000
commit32772d3bba0483a6119f7135a22e59a4389ef055 (patch)
tree5e99f7dd5bc3584dda8a84ce69f726bf82e10001
parentea326f93fe56037684241dbac254c0d9a62aa2f2 (diff)
downloadorg.eclipse.qvtd-32772d3bba0483a6119f7135a22e59a4389ef055.tar.gz
org.eclipse.qvtd-32772d3bba0483a6119f7135a22e59a4389ef055.tar.xz
org.eclipse.qvtd-32772d3bba0483a6119f7135a22e59a4389ef055.zip
[500962] Correct GuardParameterBinding WFRs
-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