Propagate input type position across incorporation properly

^KT-45719 Fixed
This commit is contained in:
Victor Petukhov
2021-03-26 17:01:26 +03:00
parent d06031ece3
commit 7f2c5cde55
6 changed files with 48 additions and 1 deletions
@@ -0,0 +1,15 @@
// WITH_RUNTIME
// !DIAGNOSTICS: -UNUSED_PARAMETER
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
import kotlin.internal.OnlyInputTypes
fun <<!HIDDEN!>@OnlyInputTypes<!> T> assertEquals(expected: T, actual: T, message: String? = null) {}
fun main() {
assertEquals(
mapOf(1 to "1", 2 to "2", 3 to "3"),
intArrayOf(1, 2, 3).associateWith { it.toString() }
)
}
@@ -0,0 +1,15 @@
// WITH_RUNTIME
// !DIAGNOSTICS: -UNUSED_PARAMETER
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
import kotlin.internal.OnlyInputTypes
fun <@OnlyInputTypes T> assertEquals(expected: T, actual: T, message: String? = null) {}
fun main() {
assertEquals(
mapOf(1 to "1", 2 to "2", 3 to "3"),
intArrayOf(1, 2, 3).associateWith { it.toString() }
)
}
@@ -0,0 +1,4 @@
package
public fun </*0*/ @kotlin.internal.OnlyInputTypes T> assertEquals(/*0*/ expected: T, /*1*/ actual: T, /*2*/ message: kotlin.String? = ...): kotlin.Unit
public fun main(): kotlin.Unit