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

Bug 360738

Summary: validation isn't validating assigning null to non-nullable variable
Product: z_Archived Reporter: Jing Qian <jqian>
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: carrollk, pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jing Qian CLA 2011-10-12 17:50:20 EDT
I have the following code

function myF() 
   s String;
   s = null;

   a String[];
   a = null;
end

right now, validation gives me validation error on a, saying can't assign null to non nullable, which is good, but it should also give me the same validation error on s = null
Comment 1 Paul Harmon CLA 2011-10-13 11:50:52 EDT
I have updated AssignmentStatementValidator to fix this. When I originally added the validation, I thought that this rule only applied to reference types. Matt confirms that this is not valid for value types as well.
Comment 2 Jing Qian CLA 2011-11-11 15:19:12 EST
verified on 2011/11/11/0901's build