fixup! User-defined operators: Tests

This commit is contained in:
Kamil Śliwak 2023-01-24 18:14:39 +01:00
parent 9250da605b
commit 7723f90a07
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,12 @@
using {L.add as +} for A;
using {L.add as +} for AP;
library L {
function add(A, A) private pure returns (A) {}
function add(AP, AP) internal pure returns (AP) {}
}
type A is address;
type AP is address payable;
// ----
// DeclarationError 7920: (7-12): Identifier not found or not unique.

View File

@ -0,0 +1,10 @@
type AP is address payable;
function sub(AP, AP) pure returns (AP) {}
function unsub(AP) pure returns (AP) {}
function attachedPure(AP, uint, address) pure {}
function attachedView(AP) view {}
function attached(AP, function(AP)) {}
using {sub as -, attachedPure, attachedView, unsub as -, attached} for AP;