fix: reject inexact integer literals in float context
This commit is contained in:
@@ -48,6 +48,7 @@ Code :: enum {
|
||||
missing_entry,
|
||||
invalid_entry,
|
||||
literal_out_of_range,
|
||||
inexact_integer_literal,
|
||||
invalid_escape,
|
||||
read_before_initialization,
|
||||
write_before_initialization,
|
||||
@@ -131,6 +132,7 @@ messages :: $enummap.init(Code, []u8, {
|
||||
missing_entry = "program requires a main function",
|
||||
invalid_entry = "main must be a function with no parameters",
|
||||
literal_out_of_range = "numeric literal is outside its runtime type's range",
|
||||
inexact_integer_literal = "integer literal is not exactly representable as float; use a floating literal to allow rounding",
|
||||
invalid_escape = "invalid string escape",
|
||||
read_before_initialization = "local value was read before initialization",
|
||||
write_before_initialization = "local value was assigned before initialization",
|
||||
|
||||
Reference in New Issue
Block a user