mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-10-26 15:13:13 +03:00
More error cleanup
This commit is contained in:
parent
3e867010b4
commit
906df51241
@ -40,7 +40,7 @@ create_messages!(
|
||||
@formatted
|
||||
unary_overflow {
|
||||
args: (left: impl Display, op: impl Display),
|
||||
msg: format!("The const operation `({op} {left}{}` causes an overflow.", type_name(&left)),
|
||||
msg: format!("The const operation `({op} {left}{})` causes an overflow.", type_name(&left)),
|
||||
help: None,
|
||||
}
|
||||
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EFLA0373001]: The const operation `(neg -128i8` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
- "Error [EFLA0373001]: The const operation `(neg -128i8)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EFLA0373001]: The const operation `(neg -170141183460469231731687303715884105728i128` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i128 = -a;\n | ^^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -170141183460469231731687303715884105728i128` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
- "Error [EFLA0373001]: The const operation `(neg -170141183460469231731687303715884105728i128)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i128 = -a;\n | ^^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -170141183460469231731687303715884105728i128)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EFLA0373001]: The const operation `(neg -170141183460469231731687303715884105728i128` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i128 = -a;\n | ^^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -170141183460469231731687303715884105728i128` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
- "Error [EFLA0373001]: The const operation `(neg -170141183460469231731687303715884105728i128)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i128 = -a;\n | ^^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -170141183460469231731687303715884105728i128)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EFLA0373001]: The const operation `(neg -32768i16` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i16 = -a;\n | ^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -32768i16` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
- "Error [EFLA0373001]: The const operation `(neg -32768i16)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i16 = -a;\n | ^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -32768i16)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EFLA0373001]: The const operation `(neg -2147483648i32` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i32 = -a;\n | ^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -2147483648i32` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
- "Error [EFLA0373001]: The const operation `(neg -2147483648i32)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i32 = -a;\n | ^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -2147483648i32)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EFLA0373001]: The const operation `(neg -2147483648i32` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i32 = -a;\n | ^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -2147483648i32` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
- "Error [EFLA0373001]: The const operation `(neg -2147483648i32)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i32 = -a;\n | ^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -2147483648i32)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EFLA0373001]: The const operation `(neg -9223372036854775808i64` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i64 = -a;\n | ^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -9223372036854775808i64` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
- "Error [EFLA0373001]: The const operation `(neg -9223372036854775808i64)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i64 = -a;\n | ^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -9223372036854775808i64)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EFLA0373001]: The const operation `(neg -9223372036854775808i64` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i64 = -a;\n | ^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -9223372036854775808i64` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
- "Error [EFLA0373001]: The const operation `(neg -9223372036854775808i64)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i64 = -a;\n | ^^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -9223372036854775808i64)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EFLA0373001]: The const operation `(neg -128i8` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i8 = -a;\n | ^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -128i8` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
- "Error [EFLA0373001]: The const operation `(neg -128i8)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i8 = -a;\n | ^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -128i8)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EFLA0373001]: The const operation `(neg -128i8` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i8 = -a;\n | ^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -128i8` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
- "Error [EFLA0373001]: The const operation `(neg -128i8)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \nError [ETYC0372002]: Cannot assign a non-const or invalid expression `(neg a)` to const variable `b`\n --> compiler-test:5:5\n |\n 5 | const b: i8 = -a;\n | ^^^^^^^^^^^^^^^^\nError [EFLA0373001]: The const operation `(neg -128i8)` causes an overflow.\n --> compiler-test:1:1\n |\n 1 | \n | \n"
|
||||
|
Loading…
Reference in New Issue
Block a user