Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321001 - Operation return types are not checked
Summary: Operation return types are not checked
Status: CLOSED FIXED
Alias: None
Product: Epsilon
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dimitris Kolovos CLA
QA Contact:
URL:
Whiteboard: interim
Keywords:
: 338379 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-27 08:12 EDT by Dimitris Kolovos CLA
Modified: 2012-02-06 10:59 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 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