Drop inlineOptions and fix forgotten usages
This commit is contained in:
-22
@@ -591,22 +591,6 @@ public interface Function</*0*/ out R> {
|
||||
/*primary*/ public constructor HiddenDeclaration()
|
||||
}
|
||||
|
||||
public final enum class InlineOption : kotlin.Enum<kotlin.InlineOption> {
|
||||
enum entry LOCAL_CONTINUE_AND_BREAK
|
||||
|
||||
enum entry ONLY_LOCAL_RETURN
|
||||
|
||||
/*primary*/ private constructor InlineOption()
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: kotlin.InlineOption): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): kotlin.InlineOption
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<kotlin.InlineOption>
|
||||
}
|
||||
|
||||
public final class Int : kotlin.Number, kotlin.Comparable<kotlin.Int> {
|
||||
/*primary*/ private constructor Int()
|
||||
public final fun and(/*0*/ other: kotlin.Int): kotlin.Int
|
||||
@@ -1268,12 +1252,6 @@ public object Unit {
|
||||
/*primary*/ public constructor inline()
|
||||
}
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) @kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() public final class inlineOptions : kotlin.Annotation {
|
||||
/*primary*/ public constructor inlineOptions(/*0*/ vararg value: kotlin.InlineOption /*kotlin.Array<out kotlin.InlineOption>*/)
|
||||
public final val value: kotlin.Array<out kotlin.InlineOption>
|
||||
public final fun <get-value>(): kotlin.Array<out kotlin.InlineOption>
|
||||
}
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) @kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.annotation() public final class noinline : kotlin.Annotation {
|
||||
/*primary*/ public constructor noinline()
|
||||
}
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
package test
|
||||
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
abstract class A<R> {
|
||||
abstract fun getO() : R
|
||||
|
||||
compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.2.kt
Vendored
-1
@@ -1,6 +1,5 @@
|
||||
package test
|
||||
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
abstract class A<R>(val param : R) {
|
||||
abstract fun getO() : R
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun testAllInline(f: () -> String) : String {
|
||||
val args = arrayOf("1", "2", "3")
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test
|
||||
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> doWork(crossinline job: ()-> R) : R {
|
||||
return notInline({job()})
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test
|
||||
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> doWork(crossinline job: ()-> R) : R {
|
||||
val k = 10;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test
|
||||
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
public class Data()
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package zzz
|
||||
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun calc(crossinline lambda: () -> Int): Int {
|
||||
return doCalc { lambda() }
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
fun test1(param: String): String {
|
||||
var result = "fail1"
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
package test
|
||||
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> call(crossinline f: () -> R) : R {
|
||||
return {f()} ()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
fun testSameCaptured() : String {
|
||||
var result = 0;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test
|
||||
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> doWork(crossinline job: ()-> R) : R {
|
||||
val k = 10;
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun test1(crossinline param: () -> String): String {
|
||||
var result = "fail"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test
|
||||
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> doWork(crossinline job: ()-> R) : R {
|
||||
return notInline({job()})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
|
||||
fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
|
||||
fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
|
||||
inline fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
|
||||
fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
|
||||
fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
|
||||
inline fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return test()
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return test{"OK"}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
|
||||
inline fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun<reified T> createArray(n: Int, crossinline block: () -> T): Array<T> {
|
||||
return Array<T>(n) { block() }
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun<reified T> createArray(n: Int, crossinline block: () -> T): Array<T> {
|
||||
return Array<T>(n) { block() }
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun<reified T1, reified T2> createArray(n: Int, crossinline block: () -> Pair<T1, T2>): Pair<Array<T1>, Array<T2>> {
|
||||
return Pair(Array(n) { block().first }, Array(n) { block().second })
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
class A {
|
||||
fun foo() {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package foo
|
||||
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
class Foo {
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package foo
|
||||
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
class Foo {
|
||||
|
||||
|
||||
@@ -11,4 +11,4 @@ val a: Enum<E> = E.ENTRY
|
||||
val b: Enum<RetentionPolicy> = RetentionPolicy.RUNTIME
|
||||
|
||||
// Test deserialized resolve
|
||||
val c: Enum<InlineOption> = InlineOption.ONLY_LOCAL_RETURN
|
||||
val c: Enum<AnnotationTarget> = AnnotationTarget.CLASS
|
||||
|
||||
@@ -2,7 +2,7 @@ package
|
||||
|
||||
public val a: kotlin.Enum<E>
|
||||
public val b: kotlin.Enum<java.lang.annotation.RetentionPolicy>
|
||||
public val c: kotlin.Enum<kotlin.InlineOption>
|
||||
public val c: kotlin.Enum<kotlin.annotation.AnnotationTarget>
|
||||
|
||||
public final enum class E : kotlin.Enum<E> {
|
||||
enum entry ENTRY
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> inlineFunOnlyLocal(crossinline p: () -> R) {
|
||||
val s = object {
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> inlineFunOnlyLocal(crossinline p: () -> R) {
|
||||
val s = object {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> onlyLocal(crossinline p: () -> R) {
|
||||
inlineAll(p)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> inlineFunWithAnnotation(crossinline p: () -> R) {
|
||||
inlineFun {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
import kotlin.InlineOption.ONLY_LOCAL_RETURN
|
||||
|
||||
inline fun testSameCaptured(lambdaWithResultCaptured: () -> Unit) : String {
|
||||
doWork({<!NON_LOCAL_RETURN_NOT_ALLOWED!>lambdaWithResultCaptured<!>()})
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> inlineFunOnlyLocal(crossinline p: () -> R) {
|
||||
<!NOT_YET_SUPPORTED_IN_INLINE!>fun a() {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> inlineFunOnlyLocal(crossinline p: () -> R) {
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> inlineFunOnlyLocal(crossinline p: () -> R) {
|
||||
<!NOT_YET_SUPPORTED_IN_INLINE!>class A {
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
fun <R> fun1(p: () -> R) {
|
||||
inlineFun {
|
||||
|
||||
Vendored
-1
@@ -1,5 +1,4 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
class Z {
|
||||
inline fun <R> inlineFun(crossinline p: () -> R) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun <R> toOnlyLocal(crossinline p: () -> R) {
|
||||
p()
|
||||
|
||||
Reference in New Issue
Block a user