Test cases for bindng operators to builtin functions

This commit is contained in:
wechman 2022-08-08 11:09:14 +02:00
parent e0c688d55d
commit b5f61285b7
4 changed files with 30 additions and 0 deletions

View File

@ -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.

View File

@ -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.

View File

@ -0,0 +1,6 @@
type Int is int16;
using {keccak256 as +} for Int;
// ----
// TypeError 8187: (27-36): Expected function name.

View File

@ -0,0 +1,6 @@
type Int is int16;
using {revert as +} for Int;
// ----
// DeclarationError 7920: (27-33): Identifier not found or not unique.