Create hacks for magic annotations NoInfer, OnlyInputTypes and LowPriorityInOverloadResolution.
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
//!DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.jvm.JvmName("containsAny")
|
||||
@kotlin.internal.LowPriorityInOverloadResolution
|
||||
public fun <T> Iterable<T>.contains1(element: T): Int = null!!
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
public fun <T> Iterable<T>.contains1(element: @kotlin.internal.NoInfer T): Boolean = null!!
|
||||
|
||||
|
||||
fun test() {
|
||||
val a: Int = listOf(1).contains1("")
|
||||
val b: Boolean = listOf(1).contains1(1)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) @kotlin.jvm.JvmName(name = "containsAny") @kotlin.internal.LowPriorityInOverloadResolution() public fun </*0*/ T> kotlin.Iterable<T>.contains1(/*0*/ element: T): kotlin.Int
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> kotlin.Iterable<T>.contains1(/*0*/ element: T): kotlin.Boolean
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
//!DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.jvm.JvmName("containsAny")
|
||||
@kotlin.internal.LowPriorityInOverloadResolution
|
||||
public fun <T> Iterable<T>.contains1(element: T): Int = null!!
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
public fun <@kotlin.internal.OnlyInputTypes T> Iterable<T>.contains1(element: T): Boolean = null!!
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@JvmName("getAny")
|
||||
@kotlin.internal.LowPriorityInOverloadResolution
|
||||
public fun <K, V> Map<K, V>.get1(key: Any?): Int = null!!
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
public fun <@kotlin.internal.OnlyInputTypes K, V> Map<out K, V>.get1(key: K): V? = null!!
|
||||
|
||||
fun test(map: Map<Int, String>) {
|
||||
val a: Int = listOf(1).contains1("")
|
||||
val b: Boolean = listOf(1).contains1(1)
|
||||
|
||||
val c: Int = map.get1("")
|
||||
val d: String? = map.get1(1)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ map: kotlin.Map<kotlin.Int, kotlin.String>): kotlin.Unit
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) @kotlin.jvm.JvmName(name = "containsAny") @kotlin.internal.LowPriorityInOverloadResolution() public fun </*0*/ T> kotlin.Iterable<T>.contains1(/*0*/ element: T): kotlin.Int
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> kotlin.Iterable<T>.contains1(/*0*/ element: T): kotlin.Boolean
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) @kotlin.jvm.JvmName(name = "getAny") @kotlin.internal.LowPriorityInOverloadResolution() public fun </*0*/ K, /*1*/ V> kotlin.Map<K, V>.get1(/*0*/ key: kotlin.Any?): kotlin.Int
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ K, /*1*/ V> kotlin.Map<out K, V>.get1(/*0*/ key: K): V?
|
||||
Reference in New Issue
Block a user