E4025

E4025#

Method has been defined for multiple types.

Erroneous Example#

let a = to_string(true)

The example above tries to call the method to_string on a boolean value, but this method has already been defined for multiple types so that the compiler cannot properly deduce which method to call, giving the following error on line 1:

Method to_string has been defined for the following types:
<FILE>.mbt:<LINE>:<COLUMN> String
<FILE>.mbt:<LINE>:<COLUMN> Int64
<SNIP>

Suggestion#

Disambiguate the method by specifying the type it comes from:

let a = Bool::to_string(true)