Skip to content

TP0232

Error: ambiguous .NET overload

  • ambiguous call to '<T>.<m>': it could be '<m>(<P1>)' or '<m>(<P2>)' (M21)

From the golden case tests/cases/m21/ambiguous/main.tpn (one file of a multi-file case):

main.tpn
from dotnet.Acme.Geometry import Shapes
print(Shapes.Describe(1, 2))

The compiler reports:

main.tpn:3:14: error TP0232: ambiguous call to 'Shapes.Describe': it could be 'Describe(long, int)' or 'Describe(int, long)'

The specification lists every code.