Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363875 - Error in generated Java when return statement doesn't specify returnValue
Summary: Error in generated Java when return statement doesn't specify returnValue
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-11-15 17:24 EST by broy2 CLA
Modified: 2017-02-23 14:19 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description broy2 CLA 2011-11-15 17:24:45 EST
program MyProgram
    myInt int;
    function main()
        myInt = myReturnTest();
    end
    function myReturnTest() returns(int)
        myInt int;
        return;
    end
end

Causes error in generated Java:
This method must return a result of type int	

Same program in RBD generates OK.

It should use the default value of the type in returns(int).
Comment 1 Jeff Douglas CLA 2011-11-16 13:53:21 EST
fixed
Comment 2 broy2 CLA 2011-11-17 11:57:12 EST
Verified in 20111117 build.