mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add test: operator_parameter_with_wrong_data_location
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
struct S { uint128 x; }
|
||||
|
||||
using {add as +} for S;
|
||||
|
||||
function add(S memory, S storage) returns (S memory) {
|
||||
return S(0);
|
||||
}
|
||||
|
||||
// ----
|
||||
// TypeError 1884: (32-35): The function "add" needs to have two parameters of equal type to be used for the operator +.
|
||||
Reference in New Issue
Block a user