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

Bug 354025

Summary: Generation has exception on this egl statement s1[2:3] = s2;
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-08-05 13:01:19 EDT
Build Identifier: 0.7

EGL code
   		longStr = "123456789";	
  	  	shortStr = "abc";
  		longStr[2:4] = shortStr;   		
  		desiredResult = "1abc56789";
		SysLib.writstdout("results" + (longStr == desiredResult) );

JavaGen & JavaScript produce this error

IWN.JavaGen.9998.e 0/0 Exception occurred: No such method genAssignment(org.eclipse.edt.mof.egl.impl.SubstringAccessImpl, org.eclipse.edt.gen.java.Context, org.eclipse.edt.mof.codegen.api.TabbedWriter, 
 org.eclipse.edt.mof.egl.impl.MemberNameImpl, java.lang.String, ) for any template for Class org.eclipse.edt.mof.egl.impl.SubstringAccessImpl

Reproducible: Always

Steps to Reproduce:
1. write the function above
2. save the file
3.
Comment 1 Kathy Carroll CLA 2011-08-05 13:16:53 EDT
After talking to Tim, I understand the decision hasn't been made about including this assignment behavior.  I'll let you decide what needs to happen to the defect.
Comment 2 Jeff Douglas CLA 2011-08-05 14:29:37 EDT
A decision was made to not allow substring on the lhs of an assignment, so this is not valid syntax to support.
Comment 3 Kathy Carroll CLA 2011-09-16 13:59:25 EDT
not supported