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

Bug 325327

Summary: [OCLinEcore] Provide + for String Concatenation
Product: [Modeling] OCL Reporter: Simon harrer <simon.harrer>
Component: CoreAssignee: OCL Inbox <mdt-ocl-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: ed
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Simon harrer CLA 2010-09-15 06:20:48 EDT
Build Identifier: 20100617-1415

The following ecore model shows an error due to the fact that the + operator cannot be used for String Concatenation. This is syntactic sugar but mostly used in other OCL languages. 

The intereseting thing is, that the following code compiles:
package files : files = 'http://files'
{
	class BPELProject
	{
		attribute path : String[1];
		
		operation testConcat() : String {
			body: path + 'asdf';
		}
	}
}
However, the methods throw an exception using OCL console that the + operator is undefined for strings. 

Reproducible: Always

Steps to Reproduce:
1.See details.
Comment 1 Ed Willink CLA 2010-09-17 07:39:02 EDT

*** This bug has been marked as a duplicate of bug 281710 ***