mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Call user defined type operator by member function
This commit is contained in:
parent
516e92ee96
commit
bd758a5e35
@ -0,0 +1,15 @@
|
||||
type Int is int16;
|
||||
|
||||
using {add as +} for Int;
|
||||
|
||||
function add(Int, Int) returns (Int) {
|
||||
return Int.wrap(0);
|
||||
}
|
||||
|
||||
function f() {
|
||||
Int a;
|
||||
a.add(a);
|
||||
}
|
||||
|
||||
// ----
|
||||
// TypeError 9582: (143-148): Member "add" not found or not visible after argument-dependent lookup in Int.
|
Loading…
Reference in New Issue
Block a user