Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354372 - java compile error when pass record.field as parameter to delegate
Summary: java compile error when pass record.field as parameter to delegate
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-10 08:58 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:15 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Carroll CLA 2011-08-10 08:58:00 EDT
EGL CODE:

package explore;
library tester {}
	function testMain(exeLibTestMtd exLibTestMethod, td TestDescription)
		ms boolean = exeLibTestMtd(td.name);				
	end
end
Record TestDescription
	name String;	
end
delegate exLibTestMethod(testName String) returns (boolean)
end

Java CODE:
		boolean ms = false;
		AnyBoxedObject<java.lang.String> eze$Temp1 = null;
		eze$Temp1 = EglAny.ezeWrap(td.name);
		ms = (Boolean)exeLibTestMtd.ezeUnbox().invoke(eze$Temp1);
		td.name = eze$Temp1;

Java Error on last line

Type mismatch: cannot convert from AnyBoxedObject<String> to String
Comment 1 Kathy Carroll CLA 2011-08-11 11:05:27 EDT
I think this is related

Record Status
	code int;
	reason String;
end

Library LogResult 
	private s Status;	

	function logStdOut(logmsg String)
		sysLib.writestdout(logmsg);
	end
	
	function assertTrue(failedReason String, testCondition boolean in)
		logStdOut("AssertionException message");
		logStdOut( s.reason);
	end	

end

getting: Type mismatch: cannot convert from AnyBoxedObject<String> to String

Java code:
	public void assertTrue(AnyBoxedObject<String> failedReason, boolean testCondition) {
		AnyBoxedObject<String> eze$Temp1 = null;
		eze$Temp1 = EglAny.ezeWrap("AssertionException message");
		eze_Lib_mine_LogResult().logStdOut(eze$Temp1);
		AnyBoxedObject<String> eze$Temp2 = null;
		eze$Temp2 = EglAny.ezeWrap(s.reason);
		eze_Lib_mine_LogResult().logStdOut(eze$Temp2);
		s.reason = eze$Temp2;
	}
Comment 2 Jeff Douglas CLA 2011-08-12 13:59:00 EDT
fixed
Comment 3 Kathy Carroll CLA 2011-08-15 14:48:34 EDT
verified
Comment 4 Lisa Lasher CLA 2011-10-11 16:07:32 EDT
Closing this defect.