mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixup! User-defined operators: Tests
This commit is contained in:
parent
9250da605b
commit
7723f90a07
@ -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.
|
@ -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;
|
Loading…
Reference in New Issue
Block a user