Rename UseExperimental->OptIn, Experimental->RequiresOptIn in compiler tests
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
$TESTDATA_DIR$/experimentalAndUseExperimentalWithSameAnnotation.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xuse-experimental=kotlin.Experimental
|
||||
-Xopt-in=kotlin.RequiresOptIn
|
||||
-Xexperimental=org.test.ExperimentalAPI
|
||||
-Xuse-experimental=org.test.ExperimentalAPI
|
||||
-Xopt-in=org.test.ExperimentalAPI
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.test
|
||||
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
$TESTDATA_DIR$/experimentalDeprecated.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xuse-experimental=kotlin.Experimental
|
||||
-Xopt-in=kotlin.RequiresOptIn
|
||||
-Xexperimental=org.test.Error1
|
||||
-Xexperimental=org.test.Hidden1
|
||||
-Xuse-experimental=org.test.Error2
|
||||
-Xuse-experimental=org.test.Hidden2
|
||||
-Xopt-in=org.test.Error2
|
||||
-Xopt-in=org.test.Hidden2
|
||||
|
||||
+4
-4
@@ -1,17 +1,17 @@
|
||||
package org.test
|
||||
|
||||
@Deprecated("Error1", level = DeprecationLevel.ERROR)
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class Error1
|
||||
|
||||
@Deprecated("Error2", level = DeprecationLevel.ERROR)
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class Error2
|
||||
|
||||
@Deprecated("Hidden1", level = DeprecationLevel.HIDDEN)
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class Hidden1
|
||||
|
||||
@Deprecated("Hidden2", level = DeprecationLevel.HIDDEN)
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class Hidden2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
$TESTDATA_DIR$/experimentalDeprecatedWarning.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xuse-experimental=kotlin.Experimental
|
||||
-Xuse-experimental=org.test.Warning1
|
||||
-Xopt-in=kotlin.RequiresOptIn
|
||||
-Xopt-in=org.test.Warning1
|
||||
-Xexperimental=org.test.Warning2
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.test
|
||||
|
||||
@Deprecated("Warning1", level = DeprecationLevel.WARNING)
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class Warning1
|
||||
|
||||
@Deprecated("Warning2", level = DeprecationLevel.WARNING)
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class Warning2
|
||||
|
||||
@@ -2,4 +2,4 @@ $TESTDATA_DIR$/experimentalIsNotAnnotation.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xexperimental=org.test.NotAnAnnotation1
|
||||
-Xuse-experimental=org.test.NotAnAnnotation2
|
||||
-Xopt-in=org.test.NotAnAnnotation2
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ $TESTDATA_DIR$/experimentalIsNotMarker.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xexperimental=org.test.NotAMarker1
|
||||
-Xuse-experimental=org.test.NotAMarker2
|
||||
-Xopt-in=org.test.NotAMarker2
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
$TESTDATA_DIR$/experimentalNested.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xuse-experimental=kotlin.Experimental
|
||||
-Xopt-in=kotlin.RequiresOptIn
|
||||
-Xexperimental=org.test.Outer.Nested
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package org.test
|
||||
|
||||
class Outer {
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class Nested
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
$TESTDATA_DIR$/experimentalUnresolved.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xuse-experimental=org.test.Unresolved1
|
||||
-Xopt-in=org.test.Unresolved1
|
||||
-Xexperimental=org.test.Unresolved2
|
||||
-Xuse-experimental=org.test.Unresolved3
|
||||
-Xopt-in=org.test.Unresolved3
|
||||
|
||||
@@ -20,7 +20,7 @@ interface AsyncIterator<out T> {
|
||||
operator suspend fun next(): T
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T> asyncGenerate(@BuilderInference block: suspend AsyncGenerator<T>.() -> Unit): AsyncSequence<T> = object : AsyncSequence<T> {
|
||||
override fun iterator(): AsyncIterator<T> {
|
||||
val iterator = AsyncGeneratorIterator<T>()
|
||||
|
||||
@@ -21,7 +21,7 @@ interface AsyncIterator<out T> {
|
||||
operator suspend fun next(): T
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T> asyncGenerate(@BuilderInference block: suspend AsyncGenerator<T>.() -> Unit): AsyncSequence<T> = object : AsyncSequence<T> {
|
||||
override fun iterator(): AsyncIterator<T> {
|
||||
val iterator = AsyncGeneratorIterator<T>()
|
||||
|
||||
@@ -20,7 +20,7 @@ interface AsyncIterator<out T> {
|
||||
operator suspend fun next(): T
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T> asyncGenerate(@BuilderInference block: suspend AsyncGenerator<T>.() -> Unit): AsyncSequence<T> = object : AsyncSequence<T> {
|
||||
override fun iterator(): AsyncIterator<T> {
|
||||
val iterator = AsyncGeneratorIterator<T>()
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ interface Foo<T>
|
||||
|
||||
class FooImpl<T> : Foo<T>
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T> myflow(@BuilderInference block: Foo<T>.() -> Unit): Foo<T> {
|
||||
val impl = FooImpl<T>()
|
||||
impl.block()
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ fun myLaunch(
|
||||
block: suspend MyCoroutineScope.() -> Unit
|
||||
) {}
|
||||
|
||||
@UseExperimental(kotlin.experimental.ExperimentalTypeInference::class)
|
||||
@OptIn(kotlin.experimental.ExperimentalTypeInference::class)
|
||||
public fun <E> myProduce(@BuilderInference block: suspend MyProducerScope<E>.() -> Unit) {}
|
||||
|
||||
fun <T> MyReceiveChannel<T>.debounce(period: Long) {
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
package test
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ interface LiveDataScope<T> {
|
||||
suspend fun emit(value: T)
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T> liveData(@BuilderInference block: suspend LiveDataScope<T>.() -> Unit): LiveData<T> = null!!
|
||||
|
||||
fun <Value> Flow<Value>.asLiveData() = liveData {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ fun main(args: Array<String>) {
|
||||
println(s.toList())
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
@BuilderInference
|
||||
suspend fun SequenceScope<Int>.awaitSeq(): Int = 42
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
|
||||
import kotlin.reflect.KSuspendFunction0
|
||||
import kotlin.reflect.KSuspendFunction1
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
@@ -12,7 +12,7 @@ interface ProducerScope<E> {
|
||||
class CoroutineScope
|
||||
class ReceiveChannel<E>
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
public fun <E> produce(@BuilderInference block: suspend ProducerScope<E>.() -> Unit): ProducerScope<E> = TODO()
|
||||
|
||||
fun test(ls: List<Int>) =
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package
|
||||
|
||||
@kotlin.UseExperimental(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ E> produce(/*0*/ @kotlin.BuilderInference block: suspend ProducerScope<E>.() -> kotlin.Unit): ProducerScope<E>
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ E> produce(/*0*/ @kotlin.BuilderInference block: suspend ProducerScope<E>.() -> kotlin.Unit): ProducerScope<E>
|
||||
public fun test(/*0*/ ls: kotlin.collections.List<kotlin.Int>): ProducerScope<kotlin.Int>
|
||||
private fun </*0*/ E> kotlin.collections.Iterable<E>.asReceiveChannel(): ReceiveChannel<E>
|
||||
public suspend fun </*0*/ E, /*1*/ C> ReceiveChannel<E>.toChannel(/*0*/ destination: C): C
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
@@ -9,7 +9,7 @@ suspend fun main() {
|
||||
}
|
||||
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <K> iFlow(@BuilderInference block: suspend iFlowCollector<in K>.() -> Unit): iFlow<K> = TODO()
|
||||
|
||||
interface iFlowCollector<S> {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package
|
||||
|
||||
@kotlin.UseExperimental(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ K> iFlow(/*0*/ @kotlin.BuilderInference block: suspend iFlowCollector<in K>.() -> kotlin.Unit): iFlow<K>
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ K> iFlow(/*0*/ @kotlin.BuilderInference block: suspend iFlowCollector<in K>.() -> kotlin.Unit): iFlow<K>
|
||||
public suspend fun main(): kotlin.Unit
|
||||
|
||||
public interface iFlow</*0*/ out V> {
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
@@ -7,7 +7,7 @@ interface Inv<T> {
|
||||
fun send(e: T)
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <K> foo(@BuilderInference block: Inv<K>.() -> Unit) {}
|
||||
|
||||
fun test(i: Int) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package
|
||||
|
||||
@kotlin.UseExperimental(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ K> foo(/*0*/ @kotlin.BuilderInference block: Inv<K>.() -> kotlin.Unit): kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ K> foo(/*0*/ @kotlin.BuilderInference block: Inv<K>.() -> kotlin.Unit): kotlin.Unit
|
||||
public fun test(/*0*/ i: kotlin.Int): kotlin.Unit
|
||||
|
||||
public interface Inv</*0*/ T> {
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
// FILE: a.kt
|
||||
@@ -19,7 +19,7 @@ public class Queue {
|
||||
|
||||
// FILE: c.kt
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
package c
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
@@ -8,7 +8,7 @@ interface ProducerScope<E> {
|
||||
fun yield(e: E)
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <E> produce(@BuilderInference block: ProducerScope<E>.() -> Unit): ProducerScope<E> = TODO()
|
||||
|
||||
fun <K> filter(e: K, predicate: (K) -> Boolean) =
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ K> filter(/*0*/ e: K, /*1*/ predicate: (K) -> kotlin.Boolean): ProducerScope<kotlin.Int>
|
||||
@kotlin.UseExperimental(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ E> produce(/*0*/ @kotlin.BuilderInference block: ProducerScope<E>.() -> kotlin.Unit): ProducerScope<E>
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ E> produce(/*0*/ @kotlin.BuilderInference block: ProducerScope<E>.() -> kotlin.Unit): ProducerScope<E>
|
||||
|
||||
public interface ProducerScope</*0*/ E> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
@@ -9,7 +9,7 @@ interface ProducerScope<E> {
|
||||
fun yield(e: E)
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <E> produce(@BuilderInference block: ProducerScope<E>.() -> Unit): ProducerScope<E> = TODO()
|
||||
|
||||
fun <K> filter(e: K, predicate: (K) -> Boolean) =
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ K> filter(/*0*/ e: K, /*1*/ predicate: (K) -> kotlin.Boolean): ProducerScope<kotlin.Int>
|
||||
@kotlin.UseExperimental(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ E> produce(/*0*/ @kotlin.BuilderInference block: ProducerScope<E>.() -> kotlin.Unit): ProducerScope<E>
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ E> produce(/*0*/ @kotlin.BuilderInference block: ProducerScope<E>.() -> kotlin.Unit): ProducerScope<E>
|
||||
|
||||
public interface ProducerScope</*0*/ E> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
@@ -18,7 +18,7 @@ class Foo<T>
|
||||
|
||||
fun <T> f1(f: Foo<T>.() -> Unit) {}
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T> f2(@BuilderInference f: Foo<T>.() -> Unit) {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> f1(/*0*/ f: Foo<T>.() -> kotlin.Unit): kotlin.Unit
|
||||
@kotlin.UseExperimental(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ T> f2(/*0*/ @kotlin.BuilderInference f: Foo<T>.() -> kotlin.Unit): kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ T> f2(/*0*/ @kotlin.BuilderInference f: Foo<T>.() -> kotlin.Unit): kotlin.Unit
|
||||
public fun test1(): kotlin.Unit
|
||||
public fun test2(): [ERROR : Error function type]
|
||||
public fun test3(): kotlin.Unit
|
||||
|
||||
Vendored
+2
-2
@@ -1,8 +1,8 @@
|
||||
// !LANGUAGE: +ReleaseCoroutines +ExperimentalBuilderInference
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// SKIP_TXT
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+14
-14
@@ -1,10 +1,10 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(AnnotationTarget.TYPE, AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.TYPEALIAS,
|
||||
AnnotationTarget.VALUE_PARAMETER)
|
||||
annotation class ExperimentalAPI
|
||||
@@ -65,41 +65,41 @@ package usage2
|
||||
|
||||
import api.*
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
@EAnno fun function() {}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
fun parameter(@EAnno p: String) {}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
fun parameterType(p: @EAnno String) {}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
fun returnType(): @EAnno Unit {}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
@EAnno val property = ""
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
@EAnno typealias Typealias = Unit
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
@EAnno class Klass
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
annotation class AnnotationArgument(val p: EAnno)
|
||||
|
||||
fun insideBody() {
|
||||
@UseExperimental(ExperimentalAPI::class) @EAnno fun local() {}
|
||||
@OptIn(ExperimentalAPI::class) @EAnno fun local() {}
|
||||
}
|
||||
|
||||
fun inDefaultArgument(@UseExperimental(ExperimentalAPI::class) f: () -> Unit = @EAnno fun() {}) {}
|
||||
fun inDefaultArgument(@OptIn(ExperimentalAPI::class) f: () -> Unit = @EAnno fun() {}) {}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
val inProperty = @EAnno fun() {}
|
||||
|
||||
val inPropertyAccessor: () -> Unit
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
get() = @EAnno fun() {}
|
||||
|
||||
// FILE: usage-none.kt
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(AnnotationTarget.TYPE, AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.TYPEALIAS,
|
||||
AnnotationTarget.VALUE_PARAMETER)
|
||||
annotation class ExperimentalAPI
|
||||
@@ -65,41 +65,41 @@ package usage2
|
||||
|
||||
import api.*
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
@EAnno fun function() {}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
fun parameter(@EAnno p: String) {}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
fun parameterType(p: @EAnno String) {}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
fun returnType(): @EAnno Unit {}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
@EAnno val property = ""
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
@EAnno typealias Typealias = Unit
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
@EAnno class Klass
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
annotation class AnnotationArgument(val p: EAnno)
|
||||
|
||||
fun insideBody() {
|
||||
@UseExperimental(ExperimentalAPI::class) @EAnno fun local() {}
|
||||
@OptIn(ExperimentalAPI::class) @EAnno fun local() {}
|
||||
}
|
||||
|
||||
fun inDefaultArgument(@UseExperimental(ExperimentalAPI::class) f: () -> Unit = @EAnno fun() {}) {}
|
||||
fun inDefaultArgument(@OptIn(ExperimentalAPI::class) f: () -> Unit = @EAnno fun() {}) {}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
val inProperty = @EAnno fun() {}
|
||||
|
||||
val inPropertyAccessor: () -> Unit
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
get() = @EAnno fun() {}
|
||||
|
||||
// FILE: usage-none.kt
|
||||
|
||||
+12
-12
@@ -9,7 +9,7 @@ package api {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE, AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.TYPEALIAS, AnnotationTarget.VALUE_PARAMETER}) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE, AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.TYPEALIAS, AnnotationTarget.VALUE_PARAMETER}) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
public constructor ExperimentalAPI()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@@ -46,17 +46,17 @@ package usage1 {
|
||||
}
|
||||
|
||||
package usage2 {
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public val inProperty: () -> kotlin.Unit
|
||||
@get:kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public val inPropertyAccessor: () -> kotlin.Unit
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) @api.EAnno public val property: kotlin.String = ""
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) @api.EAnno public fun function(): kotlin.Unit
|
||||
public fun inDefaultArgument(/*0*/ @kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) f: () -> kotlin.Unit = ...): kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public val inProperty: () -> kotlin.Unit
|
||||
@get:kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public val inPropertyAccessor: () -> kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) @api.EAnno public val property: kotlin.String = ""
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) @api.EAnno public fun function(): kotlin.Unit
|
||||
public fun inDefaultArgument(/*0*/ @kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) f: () -> kotlin.Unit = ...): kotlin.Unit
|
||||
public fun insideBody(): kotlin.Unit
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public fun parameter(/*0*/ @api.EAnno p: kotlin.String): kotlin.Unit
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public fun parameterType(/*0*/ p: @api.EAnno kotlin.String): kotlin.Unit
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public fun returnType(): @api.EAnno kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public fun parameter(/*0*/ @api.EAnno p: kotlin.String): kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public fun parameterType(/*0*/ p: @api.EAnno kotlin.String): kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public fun returnType(): @api.EAnno kotlin.Unit
|
||||
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public final annotation class AnnotationArgument : kotlin.Annotation {
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public final annotation class AnnotationArgument : kotlin.Annotation {
|
||||
public constructor AnnotationArgument(/*0*/ p: api.EAnno)
|
||||
public final val p: api.EAnno
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@@ -64,13 +64,13 @@ package usage2 {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) @api.EAnno public final class Klass {
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) @api.EAnno public final class Klass {
|
||||
public constructor Klass()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) @api.EAnno public typealias Typealias = kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) @api.EAnno public typealias Typealias = kotlin.Unit
|
||||
}
|
||||
|
||||
package usage3 {
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
interface I
|
||||
@@ -19,12 +19,12 @@ import api.*
|
||||
|
||||
open class Base(val i: I)
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
class Derived : Base(Impl())
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
class Delegated : I by Impl()
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
val delegatedProperty by Impl()
|
||||
operator fun I.getValue(x: Any?, y: Any?) = null
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
interface I
|
||||
@@ -19,12 +19,12 @@ import api.*
|
||||
|
||||
open class Base(val i: I)
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
class Derived : Base(Impl())
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
class Delegated : I by Impl()
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
val delegatedProperty by Impl()
|
||||
operator fun I.getValue(x: Any?, y: Any?) = null
|
||||
|
||||
@@ -2,7 +2,7 @@ package
|
||||
|
||||
package api {
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
public constructor ExperimentalAPI()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@@ -24,7 +24,7 @@ package api {
|
||||
}
|
||||
|
||||
package usage {
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public val delegatedProperty: kotlin.Nothing?
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public val delegatedProperty: kotlin.Nothing?
|
||||
public operator fun api.I.getValue(/*0*/ x: kotlin.Any?, /*1*/ y: kotlin.Any?): kotlin.Nothing?
|
||||
|
||||
public open class Base {
|
||||
@@ -35,14 +35,14 @@ package usage {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public final class Delegated : api.I {
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public final class Delegated : api.I {
|
||||
public constructor Delegated()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public final class Derived : usage.Base {
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public final class Derived : usage.Base {
|
||||
public constructor Derived()
|
||||
public final override /*1*/ /*fake_override*/ val i: api.I
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
// !DIAGNOSTICS: -NOTHING_TO_INLINE -UNUSED_PARAMETER
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
annotation class API
|
||||
|
||||
@API
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
// !DIAGNOSTICS: -NOTHING_TO_INLINE -UNUSED_PARAMETER
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
annotation class API
|
||||
|
||||
@API
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package
|
||||
package api {
|
||||
@api.API public fun f(): kotlin.Unit
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) public final annotation class API : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) public final annotation class API : kotlin.Annotation {
|
||||
public constructor API()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
@@ -51,7 +51,7 @@ package usage2
|
||||
|
||||
import api.*
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
fun useAll() {
|
||||
val c: C = C()
|
||||
c.function()
|
||||
@@ -61,7 +61,7 @@ fun useAll() {
|
||||
c.extension()
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
class Use {
|
||||
fun useAll(c: C) {
|
||||
c.function()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
@@ -51,7 +51,7 @@ package usage2
|
||||
|
||||
import api.*
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
fun useAll() {
|
||||
val c: C = C()
|
||||
c.function()
|
||||
@@ -61,7 +61,7 @@ fun useAll() {
|
||||
c.extension()
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
class Use {
|
||||
fun useAll(c: C) {
|
||||
c.function()
|
||||
|
||||
+3
-3
@@ -26,7 +26,7 @@ package api {
|
||||
}
|
||||
}
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION}) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION}) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
public constructor ExperimentalAPI()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@@ -47,9 +47,9 @@ package usage1 {
|
||||
}
|
||||
|
||||
package usage2 {
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public fun useAll(): kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public fun useAll(): kotlin.Unit
|
||||
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public final class Use {
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public final class Use {
|
||||
public constructor Use()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
Vendored
+2
-2
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -19,7 +19,7 @@ package api {
|
||||
}
|
||||
}
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY}) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY}) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
public constructor ExperimentalAPI()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION)
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
@@ -24,7 +24,7 @@ fun usage() {}
|
||||
|
||||
// FILE: usage-use.kt
|
||||
|
||||
@file:UseExperimental(ExperimentalAPI::class)
|
||||
@file:OptIn(ExperimentalAPI::class)
|
||||
package usage2
|
||||
|
||||
import api.*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION)
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
@@ -24,7 +24,7 @@ fun usage() {}
|
||||
|
||||
// FILE: usage-use.kt
|
||||
|
||||
@file:UseExperimental(ExperimentalAPI::class)
|
||||
@file:OptIn(ExperimentalAPI::class)
|
||||
package usage2
|
||||
|
||||
import api.*
|
||||
|
||||
@@ -11,7 +11,7 @@ package api {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION}) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION}) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
public constructor ExperimentalAPI()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
@@ -36,12 +36,12 @@ package usage2
|
||||
|
||||
import api.*
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
fun use1() {
|
||||
C.D.E.F()
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
fun use2(f: C.D.E.F) = f.hashCode()
|
||||
|
||||
// FILE: usage-none.kt
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
@@ -36,12 +36,12 @@ package usage2
|
||||
|
||||
import api.*
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
fun use1() {
|
||||
C.D.E.F()
|
||||
}
|
||||
|
||||
@UseExperimental(ExperimentalAPI::class)
|
||||
@OptIn(ExperimentalAPI::class)
|
||||
fun use2(f: C.D.E.F) = f.hashCode()
|
||||
|
||||
// FILE: usage-none.kt
|
||||
|
||||
+3
-3
@@ -30,7 +30,7 @@ package api {
|
||||
}
|
||||
}
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION}) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION}) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
public constructor ExperimentalAPI()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@@ -44,8 +44,8 @@ package usage1 {
|
||||
}
|
||||
|
||||
package usage2 {
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public fun use1(): kotlin.Unit
|
||||
@kotlin.UseExperimental(markerClass = {api.ExperimentalAPI::class}) public fun use2(/*0*/ f: api.C.D.E.F): kotlin.Int
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public fun use1(): kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {api.ExperimentalAPI::class}) public fun use2(/*0*/ f: api.C.D.E.F): kotlin.Int
|
||||
}
|
||||
|
||||
package usage3 {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class E
|
||||
|
||||
open class Base {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class E
|
||||
|
||||
open class Base {
|
||||
|
||||
@@ -10,7 +10,7 @@ package api {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.Experimental public final annotation class E : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn public final annotation class E : kotlin.Annotation {
|
||||
public constructor E()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// FILE: api.kt
|
||||
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class Marker
|
||||
|
||||
@Marker
|
||||
@@ -17,7 +17,7 @@ fun use2() {
|
||||
f()
|
||||
}
|
||||
|
||||
@UseExperimental(Marker::class)
|
||||
@OptIn(Marker::class)
|
||||
fun use3() {
|
||||
f()
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// FILE: api.kt
|
||||
|
||||
@<!EXPERIMENTAL_IS_NOT_ENABLED!>Experimental<!>
|
||||
@<!EXPERIMENTAL_IS_NOT_ENABLED!>RequiresOptIn<!>
|
||||
annotation class Marker
|
||||
|
||||
@Marker
|
||||
@@ -17,7 +17,7 @@ fun use2() {
|
||||
f()
|
||||
}
|
||||
|
||||
@<!EXPERIMENTAL_IS_NOT_ENABLED!>UseExperimental<!>(Marker::class)
|
||||
@<!EXPERIMENTAL_IS_NOT_ENABLED!>OptIn<!>(Marker::class)
|
||||
fun use3() {
|
||||
f()
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,9 +3,9 @@ package
|
||||
@Marker public fun f(): kotlin.Unit
|
||||
public fun use1(): kotlin.Unit
|
||||
@Marker public fun use2(): kotlin.Unit
|
||||
@kotlin.UseExperimental(markerClass = {Marker::class}) public fun use3(): kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {Marker::class}) public fun use3(): kotlin.Unit
|
||||
|
||||
@kotlin.Experimental public final annotation class Marker : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn public final annotation class Marker : kotlin.Annotation {
|
||||
public constructor Marker()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
Vendored
+2
-2
@@ -1,11 +1,11 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !EXPERIMENTAL: api.ExperimentalAPI
|
||||
// MODULE: api
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
@ExperimentalAPI
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !EXPERIMENTAL: api.ExperimentalAPI
|
||||
// MODULE: api
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
@ExperimentalAPI
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ package
|
||||
package api {
|
||||
@api.ExperimentalAPI public fun function(): kotlin.String
|
||||
|
||||
@kotlin.Experimental public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
public constructor ExperimentalAPI()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION, -UNUSED_VARIABLE, -UNUSED_PARAMETER
|
||||
|
||||
fun test() {
|
||||
@@ -18,7 +18,7 @@ fun test() {
|
||||
5u
|
||||
)
|
||||
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class) 42u
|
||||
@OptIn(ExperimentalUnsignedTypes::class) 42u
|
||||
}
|
||||
|
||||
fun takeAll(
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION, -UNUSED_VARIABLE, -UNUSED_PARAMETER
|
||||
|
||||
fun test() {
|
||||
@@ -18,7 +18,7 @@ fun test() {
|
||||
<!EXPERIMENTAL_UNSIGNED_LITERALS!>5u<!>
|
||||
)
|
||||
|
||||
@UseExperimental(ExperimentalUnsignedTypes::class) 42u
|
||||
@OptIn(ExperimentalUnsignedTypes::class) 42u
|
||||
}
|
||||
|
||||
fun takeAll(
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
|
||||
package test.abc
|
||||
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class E
|
||||
|
||||
@UseExperimental(test.abc.E::class)
|
||||
@OptIn(test.abc.E::class)
|
||||
fun f() {}
|
||||
|
||||
@test.abc.E
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
|
||||
package test.abc
|
||||
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class E
|
||||
|
||||
@UseExperimental(test.abc.E::class)
|
||||
@OptIn(test.abc.E::class)
|
||||
fun f() {}
|
||||
|
||||
@test.abc.E
|
||||
|
||||
+2
-2
@@ -3,10 +3,10 @@ package
|
||||
package test {
|
||||
|
||||
package test.abc {
|
||||
@kotlin.UseExperimental(markerClass = {test.abc.E::class}) public fun f(): kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {test.abc.E::class}) public fun f(): kotlin.Unit
|
||||
@test.abc.E public fun g(): kotlin.Unit
|
||||
|
||||
@kotlin.Experimental public final annotation class E : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn public final annotation class E : kotlin.Annotation {
|
||||
public constructor E()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package feature.experimental.self
|
||||
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class ImportedMarker
|
||||
|
||||
@ImportedMarker
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package feature.experimental.self
|
||||
|
||||
@Experimental
|
||||
@RequiresOptIn
|
||||
annotation class ImportedMarker
|
||||
|
||||
@ImportedMarker
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ package feature {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.Experimental public final annotation class ImportedMarker : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn public final annotation class ImportedMarker : kotlin.Annotation {
|
||||
public constructor ImportedMarker()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+5
-5
@@ -1,25 +1,25 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
import kotlin.annotation.AnnotationTarget.*
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(CLASS, ANNOTATION_CLASS, TYPE_PARAMETER, PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER, CONSTRUCTOR, FUNCTION,
|
||||
PROPERTY_GETTER, PROPERTY_SETTER, TYPE, TYPEALIAS)
|
||||
annotation class E1
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(FILE)
|
||||
annotation class E2
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(EXPRESSION)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class E3
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(FILE, EXPRESSION)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class E4
|
||||
|
||||
+5
-5
@@ -1,25 +1,25 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
import kotlin.annotation.AnnotationTarget.*
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
@Target(CLASS, ANNOTATION_CLASS, TYPE_PARAMETER, PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER, CONSTRUCTOR, FUNCTION,
|
||||
PROPERTY_GETTER, PROPERTY_SETTER, TYPE, TYPEALIAS)
|
||||
annotation class E1
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
<!EXPERIMENTAL_ANNOTATION_WITH_WRONG_TARGET!>@Target(FILE)<!>
|
||||
annotation class E2
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
<!EXPERIMENTAL_ANNOTATION_WITH_WRONG_TARGET!>@Target(EXPRESSION)<!>
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class E3
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
<!EXPERIMENTAL_ANNOTATION_WITH_WRONG_TARGET!>@Target(FILE, EXPRESSION)<!>
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class E4
|
||||
|
||||
+4
-4
@@ -2,28 +2,28 @@ package
|
||||
|
||||
package api {
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPE, AnnotationTarget.TYPEALIAS}) public final annotation class E1 : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPE, AnnotationTarget.TYPEALIAS}) public final annotation class E1 : kotlin.Annotation {
|
||||
public constructor E1()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FILE}) public final annotation class E2 : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FILE}) public final annotation class E2 : kotlin.Annotation {
|
||||
public constructor E2()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.EXPRESSION}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) public final annotation class E3 : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.EXPRESSION}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) public final annotation class E3 : kotlin.Annotation {
|
||||
public constructor E3()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FILE, AnnotationTarget.EXPRESSION}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) public final annotation class E4 : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FILE, AnnotationTarget.EXPRESSION}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) public final annotation class E4 : kotlin.Annotation {
|
||||
public constructor E4()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
|
||||
annotation class NotAMarker
|
||||
|
||||
@UseExperimental
|
||||
@OptIn
|
||||
fun f1() {}
|
||||
|
||||
@UseExperimental(NotAMarker::class)
|
||||
@OptIn(NotAMarker::class)
|
||||
fun f2() {}
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
|
||||
annotation class NotAMarker
|
||||
|
||||
<!USE_EXPERIMENTAL_WITHOUT_ARGUMENTS!>@UseExperimental<!>
|
||||
<!USE_EXPERIMENTAL_WITHOUT_ARGUMENTS!>@OptIn<!>
|
||||
fun f1() {}
|
||||
|
||||
<!USE_EXPERIMENTAL_ARGUMENT_IS_NOT_MARKER!>@UseExperimental(NotAMarker::class)<!>
|
||||
<!USE_EXPERIMENTAL_ARGUMENT_IS_NOT_MARKER!>@OptIn(NotAMarker::class)<!>
|
||||
fun f2() {}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
@kotlin.UseExperimental(markerClass = {}) public fun f1(): kotlin.Unit
|
||||
@kotlin.UseExperimental(markerClass = {NotAMarker::class}) public fun f2(): kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {}) public fun f1(): kotlin.Unit
|
||||
@kotlin.OptIn(markerClass = {NotAMarker::class}) public fun f2(): kotlin.Unit
|
||||
|
||||
public final annotation class NotAMarker : kotlin.Annotation {
|
||||
public constructor NotAMarker()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
annotation class E
|
||||
|
||||
open class Base {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
annotation class E
|
||||
|
||||
open class Base {
|
||||
|
||||
@@ -18,7 +18,7 @@ package api {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) public final annotation class E : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) public final annotation class E : kotlin.Annotation {
|
||||
public constructor E()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
compiler/testData/diagnostics/testsWithStdLib/experimental/overrideDifferentExperimentalities.fir.kt
Vendored
+3
-3
@@ -1,8 +1,8 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
annotation class E1
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
annotation class E3
|
||||
|
||||
interface Base1 {
|
||||
|
||||
Vendored
+3
-3
@@ -1,8 +1,8 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
annotation class E1
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
annotation class E3
|
||||
|
||||
interface Base1 {
|
||||
|
||||
Vendored
+2
-2
@@ -45,14 +45,14 @@ public final class DerivedC : Base1, Base2, Base3 {
|
||||
public open override /*3*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) public final annotation class E1 : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) public final annotation class E1 : kotlin.Annotation {
|
||||
public constructor E1()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) public final annotation class E3 : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) public final annotation class E3 : kotlin.Annotation {
|
||||
public constructor E3()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
// FILE: api.kt
|
||||
|
||||
package api
|
||||
|
||||
@Experimental(Experimental.Level.WARNING)
|
||||
@RequiresOptIn(RequiresOptIn.Level.WARNING)
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
@ExperimentalAPI
|
||||
@@ -24,7 +24,7 @@ fun use() {
|
||||
|
||||
// FILE: usage-use.kts
|
||||
|
||||
@file:UseExperimental(ExperimentalAPI::class)
|
||||
@file:OptIn(ExperimentalAPI::class)
|
||||
import api.*
|
||||
|
||||
fun use() {
|
||||
|
||||
@@ -30,7 +30,7 @@ public final class Usage_use : kotlin.script.templates.standard.ScriptTemplateWi
|
||||
package api {
|
||||
@api.ExperimentalAPI public fun function(): kotlin.String
|
||||
|
||||
@kotlin.Experimental(level = Level.WARNING) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
@kotlin.RequiresOptIn(level = Level.WARNING) public final annotation class ExperimentalAPI : kotlin.Annotation {
|
||||
public constructor ExperimentalAPI()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user