Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358484 - Smallfloat literal test false for ISA smallfloat and true for ISA FLOAT
Summary: Smallfloat literal test false for ISA smallfloat and true for ISA FLOAT
Status: CLOSED INVALID
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-09-21 15:58 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:15 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 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