mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update 2271 and 5653 error messages to mention the errors are related to the binary operator.
This commit is contained in:
@@ -27,8 +27,8 @@ contract C {
|
||||
}
|
||||
|
||||
// ----
|
||||
// TypeError 2271: (288-293): Operator + not compatible with types struct S storage ref and struct S storage ref. No matching user-defined operator found.
|
||||
// TypeError 5653: (303-314): User defined operator + not compatible with types struct S memory and bool.
|
||||
// TypeError 2271: (324-332): Operator + not compatible with types bool and struct S storage ref.
|
||||
// TypeError 2271: (288-293): Binary operator + not compatible with types struct S storage ref and struct S storage ref. No matching user-defined operator found.
|
||||
// TypeError 5653: (303-314): User defined binary operator + not compatible with types struct S memory and bool.
|
||||
// TypeError 2271: (324-332): Binary operator + not compatible with types bool and struct S storage ref.
|
||||
// TypeError 4907: (357-359): Unary operator - cannot be applied to type struct S storage ref. No matching user-defined operator found.
|
||||
// TypeError 4907: (369-374): Unary operator - cannot be applied to type bool.
|
||||
|
||||
@@ -31,4 +31,4 @@ contract D is B {
|
||||
}
|
||||
|
||||
// ----
|
||||
// TypeError 2271: (542-567): Operator + not compatible with types Int and Int. No matching user-defined operator found.
|
||||
// TypeError 2271: (542-567): Binary operator + not compatible with types Int and Int. No matching user-defined operator found.
|
||||
|
||||
+1
-1
@@ -19,4 +19,4 @@ contract C {
|
||||
}
|
||||
|
||||
// ----
|
||||
// TypeError 2271: (281-306): Operator + not compatible with types Int and Int. Multiple user-defined functions provided for this operator.
|
||||
// TypeError 2271: (281-306): Binary operator + not compatible with types Int and Int. Multiple user-defined functions provided for this operator.
|
||||
|
||||
+1
-1
@@ -27,4 +27,4 @@ contract C {
|
||||
}
|
||||
|
||||
// ----
|
||||
// TypeError 2271: (s3.sol:81-106): Operator + not compatible with types Int and Int. No matching user-defined operator found.
|
||||
// TypeError 2271: (s3.sol:81-106): Binary operator + not compatible with types Int and Int. No matching user-defined operator found.
|
||||
|
||||
@@ -29,6 +29,6 @@ function f() pure {
|
||||
// TypeError 8112: (47-50): The function "sub" needs to have one or two parameters of type Int and the same data location to be used for the operator -.
|
||||
// TypeError 7617: (61-64): The function "div" needs to have one or two parameters of type Int and the same data location to be used for the operator /.
|
||||
// TypeError 3605: (61-64): The function "div" needs to have parameters and return value of the same type to be used for the operator /.
|
||||
// TypeError 2271: (325-350): Operator + not compatible with types Int and Int. No matching user-defined operator found.
|
||||
// TypeError 2271: (356-381): Operator - not compatible with types Int and Int. No matching user-defined operator found.
|
||||
// TypeError 2271: (387-412): Operator / not compatible with types Int and Int. No matching user-defined operator found.
|
||||
// TypeError 2271: (325-350): Binary operator + not compatible with types Int and Int. No matching user-defined operator found.
|
||||
// TypeError 2271: (356-381): Binary operator - not compatible with types Int and Int. No matching user-defined operator found.
|
||||
// TypeError 2271: (387-412): Binary operator / not compatible with types Int and Int. No matching user-defined operator found.
|
||||
|
||||
@@ -64,5 +64,5 @@ function test(S calldata s) pure {
|
||||
// TypeError 7617: (82-87): The function "unsub" needs to have one or two parameters of type S and the same data location to be used for the operator -.
|
||||
// TypeError 3605: (82-87): The function "unsub" needs to have parameters and return value of the same type to be used for the operator -.
|
||||
// TypeError 7743: (98-104): The function "bitnot" needs to return exactly one value of type S to be used for the operator ~.
|
||||
// TypeError 2271: (758-763): Operator * not compatible with types struct S calldata and struct S calldata. No matching user-defined operator found.
|
||||
// TypeError 2271: (758-763): Binary operator * not compatible with types struct S calldata and struct S calldata. No matching user-defined operator found.
|
||||
// TypeError 4907: (791-793): Unary operator - cannot be applied to type struct S calldata. No matching user-defined operator found.
|
||||
|
||||
@@ -59,5 +59,5 @@ contract C {
|
||||
// TypeError 7743: (68-71): The function "mod" needs to return exactly one value of type S to be used for the operator %.
|
||||
// TypeError 7743: (82-87): The function "unsub" needs to return exactly one value of type S to be used for the operator -.
|
||||
// TypeError 1147: (98-104): The function "bitnot" needs to have exactly one parameter of type S to be used for the operator ~.
|
||||
// TypeError 2271: (722-727): Operator * not compatible with types struct S storage ref and struct S storage ref. No matching user-defined operator found.
|
||||
// TypeError 2271: (722-727): Binary operator * not compatible with types struct S storage ref and struct S storage ref. No matching user-defined operator found.
|
||||
// TypeError 4907: (779-781): Unary operator ~ cannot be applied to type struct S storage ref. No matching user-defined operator found.
|
||||
|
||||
@@ -14,4 +14,4 @@ function test() {
|
||||
Int.wrap(0) + Int.wrap(1);
|
||||
}
|
||||
// ----
|
||||
// TypeError 2271: (213-238): Operator + not compatible with types Int and Int. Multiple user-defined functions provided for this operator.
|
||||
// TypeError 2271: (213-238): Binary operator + not compatible with types Int and Int. Multiple user-defined functions provided for this operator.
|
||||
|
||||
Reference in New Issue
Block a user