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

Bug 358484

Summary: Smallfloat literal test false for ISA smallfloat and true for ISA FLOAT
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: mheitz
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-09-21 15:58:58 EDT
I think all the variations should return works. 

program driver type BasicProgram {}
	function main()
		smallFloatn1 smallFloat? = 1.4028e6;
		floatn1 float? = 1.4028e56;
		
		if (smallFloatn1 isa smallfloat)
			syslib.writestdout("works");
		else
			syslib.writestdout("unexpected");
		end
		
		if (1.4028e6 isa smallfloat)
			syslib.writestdout("works");
		else
			syslib.writestdout("unexpected");
		end
		
		if (1.4028e6 isa float)
			syslib.writestdout("unexpected");
		else
			syslib.writestdout("works");
		end
	end
end
Comment 1 Matt Heitz CLA 2011-09-22 12:49:54 EDT
Hi Kathy,

This is actually working correctly.  We don't have a literal syntax for smallfloats.  1.4028e6 (and every literal number with an 'e' in it) is a float not a smallfloat.

You could change it to this: (1.4028e6 as smallfloat) isa smallfloat

-Matt
Comment 2 Kathy Carroll CLA 2011-10-12 13:23:45 EDT
Modified test variations