Call user defined type operator by member function

This commit is contained in:
wechman 2022-08-08 12:21:49 +02:00
parent 516e92ee96
commit bd758a5e35

View File

@ -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.