Files
c3c/test/test_suite/methods/overload_ambiguity_convert.c3
Christoffer Lerno 07bd37da43 Further #2226 fixes.
2025-06-21 16:50:52 +02:00

15 lines
344 B
Plaintext

import std;
struct Word {int x;}
typedef Byte = inline ushort;
macro Word Word.add0(self, int other) @operator(+) => { self.x + (int)other };
macro Word Word.add2(self, long other) @operator(+) => { self.x + (int)other };
fn int main()
{
Word a = {1};
Byte b = 2;
Word c = a + b; // #error: has more than one candidate method
return 0;
}