Marcin Wisniowski
12/09/2019, 7:11 AMBigInteger
s, both when I use +
and plus()
. I get a compiler error about overload ambiguity: <https://ss.nohus.eu/14331/03576c27>
How to fix this error?
This does not compile:
fun main() {
BigInteger.ONE + BigInteger.ONE
}
Matthieu Esnault
12/09/2019, 8:06 AMBigInteger
?
You might have two definitions of itMarcin Wisniowski
12/09/2019, 8:43 AMBigIntegers.kt
)Matthieu Esnault
12/09/2019, 8:46 AM+
sign, does it lead to two methods?Marcin Wisniowski
12/09/2019, 8:51 AMbezrukov
12/09/2019, 9:18 AMMarcin Wisniowski
12/09/2019, 6:00 PMimport java.math.BigInteger
fun main() {
BigInteger.ONE.plus(BigInteger.ONE)
}
Same error, this is the entire file. Does it compile for other people? Any other ideas?Matthieu Esnault
12/09/2019, 6:04 PM~ > kotlinc-jvm
Welcome to Kotlin version 1.3.61 (JRE 1.8.0_141-b15)
Type :help for help, :quit for quit
>>> import java.math.BigInteger
>>> BigInteger.ONE.plus(BigInteger.ONE)
res1: java.math.BigInteger = 2
tseisel
12/10/2019, 1:27 PM