diff --git a/test/libsolidity/syntaxTests/operators/custom/bind_encode_function.sol b/test/libsolidity/syntaxTests/operators/custom/bind_encode_function.sol new file mode 100644 index 000000000..5637c62f1 --- /dev/null +++ b/test/libsolidity/syntaxTests/operators/custom/bind_encode_function.sol @@ -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. diff --git a/test/libsolidity/syntaxTests/operators/custom/bind_event.sol b/test/libsolidity/syntaxTests/operators/custom/bind_event.sol new file mode 100644 index 000000000..14a289053 --- /dev/null +++ b/test/libsolidity/syntaxTests/operators/custom/bind_event.sol @@ -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. diff --git a/test/libsolidity/syntaxTests/operators/custom/bind_keccak_function.sol b/test/libsolidity/syntaxTests/operators/custom/bind_keccak_function.sol new file mode 100644 index 000000000..3478d99b0 --- /dev/null +++ b/test/libsolidity/syntaxTests/operators/custom/bind_keccak_function.sol @@ -0,0 +1,6 @@ +type Int is int16; + +using {keccak256 as +} for Int; + +// ---- +// TypeError 8187: (27-36): Expected function name. diff --git a/test/libsolidity/syntaxTests/operators/custom/bind_revert_function.sol b/test/libsolidity/syntaxTests/operators/custom/bind_revert_function.sol new file mode 100644 index 000000000..bae572525 --- /dev/null +++ b/test/libsolidity/syntaxTests/operators/custom/bind_revert_function.sol @@ -0,0 +1,6 @@ +type Int is int16; + +using {revert as +} for Int; + +// ---- +// DeclarationError 7920: (27-33): Identifier not found or not unique.