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

Bug 368725

Summary: Missing validation when passing a null literal to a non-nullable function parameter of type any
Product: z_Archived Reporter: Brian Svihovec <svihovec>
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas, mheitz, pharmon, tww
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Brian Svihovec CLA 2012-01-16 10:53:46 EST
Given the following EGL source:

    data Any?;
    function setData(value any in)
    	if(value == null)
    		data = null;
    	else
    		data = value;
    	end
    end

    function main()
        var1 int? = null;
    	setData(var1);  
    	setData(null);
    	setData(123);
    end

A validation error should be issued for setData(null).
Comment 1 Paul Harmon CLA 2012-02-23 20:08:33 EST
fixed...see bug 368735 for details
Comment 2 Brian Svihovec CLA 2012-04-02 13:06:44 EDT
Verified in Version: 0.8.0.v201203300902-1DV-FjuJ6QMOF4nynxT88h8Ge