Fix checks on float literal exceeding max, and implicit float conversions.

This commit is contained in:
Christoffer Lerno
2021-07-15 01:17:18 +02:00
parent a18f668fc4
commit 1948ae3fe2
4 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
func void test()
{
float x = 0x7FFFFFFFFFFF.0p+400; // #error: The value '3.63419e+134' is out of range for 'float', so you need an explicit cast to truncate the value
}

View File

@@ -0,0 +1,5 @@
func void test()
{
float x = 0x7FFFFFFFFFFF.0p+40000; // #error: The float value is out of range.
}