Fix type mapping for parameter of Collection<Int>::remove override
In the case the single parameter of override has `Integer` type instead of `int` type (while in common case it would be just `int`) See the comment inside forceSingleValueParameterBoxing for clarification #KT-19892 Fixed
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
class MySet : HashSet<Int>() {
|
||||
override fun remove(element: Int): Boolean {
|
||||
return super.remove(element)
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = MySet()
|
||||
a.add(1)
|
||||
a.add(2)
|
||||
a.add(3)
|
||||
|
||||
if (!a.remove(1)) return "fail 1"
|
||||
if (a.remove(1)) return "fail 2"
|
||||
if (a.contains(1)) return "fail 3"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user