Call user defined type operator by member function

This commit is contained in:
wechman
2022-09-28 13:07:59 +02:00
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.