Fix for KT-11163: Incorrect codegen in case of custom compareTo on primitives

#KT-11163 Fixed
This commit is contained in:
Michael Bogdanov
2016-02-24 14:41:19 +03:00
parent 36e84ff23a
commit 582b1c5e66
3 changed files with 21 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
operator fun Int.compareTo(c: Char) = 0
fun foo(x: Int, y: Char): String {
if (x < y) {
throw Error()
}
return "${y}K"
}
fun box(): String {
return foo(42, 'O')
}