Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 403440

Summary: resolveoneIn(...) fails for override mappings in extending module
Product: [Modeling] QVTo Reporter: Sergey Boyko <serg.boyko2011>
Component: EngineAssignee: Project Inbox <mmt-qvt.operational-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: alex.paperno, kutter
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
The patch implements the proposed filter
serg.boyko2011: iplog+
A unit test for the patch none

Description Sergey Boyko CLA 2013-03-15 07:03:06 EDT
This bug was revealed during the review of bug 358709.

In case we extend test script (\models\bug358709\bug358709.qvto) to the following:

 main() {
	execute();
	
	var test : EPackage = resolveoneIn(EPackage::m, EPackage);
	assert fatal (test != null)
 }

we'll observe compilation error "Ambiguous mapping operation reference 'EPackage::m'. Multiple operations of different signatures exist."

Note that this exact copy of call used in inherited 'A.qvto' module. 
The problem is that method visitResolveInExpCS() in QvtOperationalVisitorCS class doesn't filter obtained list of possible matched mappings.
Comment 1 Alex Paperno CLA 2013-11-23 20:51:58 EST
Created attachment 237662 [details]
The patch implements the proposed filter
Comment 2 Alex Paperno CLA 2013-11-23 20:56:09 EST
Created attachment 237663 [details]
A unit test for the patch
Comment 3 Sergey Boyko CLA 2013-11-25 09:50:47 EST
Comment on attachment 237662 [details]
The patch implements the proposed filter

Patch effectively remediates the bug.
Comment 4 Sergey Boyko CLA 2013-11-25 09:52:55 EST
Pushed to master for M4.

Commit ID: 2ed861a127b4e5018fe09e320b3cdc4621c3840d