More descriptive error message in TypeChecker::visit(UnaryOperation)

This commit is contained in:
wechman
2022-09-28 13:06:25 +02:00
parent e001f8346b
commit 6fcd717ab4
3 changed files with 14 additions and 11 deletions
@@ -44,6 +44,6 @@ function f() pure {
// TypeError 7995: (90-92): The function "lt" needs to return exactly one value of type bool to be used for the operator <.
// TypeError 2271: (492-517): Operator + not compatible with types Int and Int. No matching user-defined operator found.
// TypeError 2271: (523-548): Operator / not compatible with types Int and Int. No matching user-defined operator found.
// TypeError 4907: (554-566): Unary operator - cannot be applied to type Int
// TypeError 4907: (554-566): Unary operator - cannot be applied to type Int. No matching user-defined operator found.
// TypeError 2271: (572-597): Operator < not compatible with types Int and Int. No matching user-defined operator found.
// TypeError 2271: (603-628): Operator > not compatible with types Int and Int. No matching user-defined operator found.
@@ -15,4 +15,4 @@ contract C {
// ----
// TypeError 1147: (32-38): The function "bitnot" needs to have exactly one parameter to be used for the operator ~.
// TypeError 4907: (186-198): Unary operator ~ cannot be applied to type Int
// TypeError 4907: (186-198): Unary operator ~ cannot be applied to type Int. No matching user-defined operator found.