[cs2as] - Making Example2V2 disambiguation need to access AS domain
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2.ocl b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2.ocl
index 561002f..4f32593 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2.ocl
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2.ocl
@@ -47,7 +47,7 @@
then as::OperationCallExp {
ownedCallExp = ownedNameExp?.ast(),
ownedArguments = roundedBrackets.args.ast(),
- referredOperation = if oclContainer().oclIsKindOf(NameExpCS) then ast().lookupOperationFrom(ast().owningSource.type, name, ast().oclAsType(as::OperationCallExp).ownedArguments) else ast().lookupOperation(name, ast().oclAsType(as::OperationCallExp).ownedArguments) endif,
+ referredOperation = lookupOperation(),
type = ast().oclAsType(as::OperationCallExp).referredOperation?.type
}
else
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Disambiguation.ocl b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Disambiguation.ocl
index fa07f72..94bbdab 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Disambiguation.ocl
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example2/classescs2asV2Disambiguation.ocl
@@ -4,9 +4,23 @@
import 'classescs2asV2Lookup.ocl'
package cs
+-- FIXME manually added
+context ElementCS
+def : ast() : as::Element =
+ ast.oclAsType(as::Element)
+
+context NameExpCS
+def : lookupOperation() : as::Operation =
+ if oclContainer().oclIsKindOf(NameExpCS)
+ then ast().lookupOperationFrom(ast().oclAsType(as::OperationCallExp).owningSource.type, self.name, ast().oclAsType(as::OperationCallExp).ownedArguments)
+ else ast().lookupOperation(name, ast().oclAsType(as::OperationCallExp).ownedArguments)
+ endif
+-- END OF manual addition
+
context NameExpCS
def : isOpCallExp() : Boolean =
roundedBrackets <> null
def : isPropCallExp() : Boolean =
roundedBrackets = null
+
endpackage