E4095#
Integer literal is out of range.
Integer literals can be used to initialize Byte, Int16, Int, Int64 and
their unsigned variants. The range of these types are as follows:
Type |
Minimum value |
Maximum value |
|---|---|---|
Byte |
0 |
255 |
Int16 |
-32768 |
32767 |
UInt16 |
0 |
65536 |
Int |
-2147483648 |
2147483647 |
UInt |
0 |
4294967295 |
Int64 |
-9223372036854775808 |
9223372036854775807 |
UInt64 |
0 |
18446744073709551615 |
Erroneous example#
///|
test {
let byte : Byte = 256
ignore(byte)
}
Suggestion#
You should either use a value that falls into the range of corresponding type, or adjust the type to accommodate the value.
///|
test {
let int : Int = 256
inspect(int, content="256")
}