mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Test cases for bindng operators to builtin functions
This commit is contained in:
parent
e0c688d55d
commit
b5f61285b7
@ -0,0 +1,10 @@
|
|||||||
|
type Int is int16;
|
||||||
|
|
||||||
|
using {abi.encode as +} for Int;
|
||||||
|
|
||||||
|
function f(Int, Int) pure returns (Int) {
|
||||||
|
return Int.wrap(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----
|
||||||
|
// DeclarationError 7920: (27-37): Identifier not found or not unique.
|
@ -0,0 +1,8 @@
|
|||||||
|
type Int is int16;
|
||||||
|
|
||||||
|
using {IntError as +} for Int;
|
||||||
|
|
||||||
|
error IntError(Int a, Int b);
|
||||||
|
|
||||||
|
// ----
|
||||||
|
// TypeError 8187: (27-35): Expected function name.
|
@ -0,0 +1,6 @@
|
|||||||
|
type Int is int16;
|
||||||
|
|
||||||
|
using {keccak256 as +} for Int;
|
||||||
|
|
||||||
|
// ----
|
||||||
|
// TypeError 8187: (27-36): Expected function name.
|
@ -0,0 +1,6 @@
|
|||||||
|
type Int is int16;
|
||||||
|
|
||||||
|
using {revert as +} for Int;
|
||||||
|
|
||||||
|
// ----
|
||||||
|
// DeclarationError 7920: (27-33): Identifier not found or not unique.
|
Loading…
Reference in New Issue
Block a user