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

Bug 321001

Summary: Operation return types are not checked
Product: [Modeling] Epsilon Reporter: Dimitris Kolovos <dkolovos>
Component: CoreAssignee: Dimitris Kolovos <dkolovos>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: agarcdomi
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: interim

Description Dimitris Kolovos CLA 2010-07-27 08:12:44 EDT
foo().println();

operation foo() : String {
	return 5;
}

works fine while it should really throw an exception since foo is declared to return a String but returns an Integer instead
Comment 1 Antonio Garcia-Dominguez CLA 2011-05-19 06:03:58 EDT
*** Bug 338379 has been marked as a duplicate of this bug. ***
Comment 2 Antonio Garcia-Dominguez CLA 2011-05-19 10:58:02 EDT
I have fixed this bug in SVN r1447. While fixing this bug, I found a typo in an EVL script inside HUTN.

Return types are cached inside EolOperations, and clearing the cache also cleans the cached return type. This is important in EUnit, as we will be reusing the same EolModule over several sets of models. If we didn't clear the cached return type between tests, the return type could refer to a model that is no longer in memory. This issue was detected in one of the Eugenia regression tests, and is now fixed.
Comment 3 Dimitris Kolovos CLA 2011-07-25 08:13:42 EDT
Fixed in 0.9.1