Support trailing comma
^KT-34743 Fixed
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// !LANGUAGE: +TrailingCommas
|
||||
|
||||
fun foo(vararg x: Int) = false
|
||||
fun foo(x: Int) = true
|
||||
|
||||
fun box(): String {
|
||||
val x = foo(1)
|
||||
val y = foo(1,)
|
||||
return if (x && y) "OK" else "ERROR"
|
||||
}
|
||||
@@ -7,5 +7,5 @@ fun <T> foo(a : T, b : Collection<T>, c : Int) {
|
||||
|
||||
fun <T> arrayListOf(vararg values: T): ArrayList<T> = throw Exception("$values")
|
||||
|
||||
val bar = foo("", arrayListOf(),<!SYNTAX!><!> )
|
||||
val bar2 = foo<String>("", arrayListOf(),<!SYNTAX!><!> )
|
||||
val bar = foo("", arrayListOf()<!UNSUPPORTED_FEATURE!>,<!> <!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
val bar2 = foo<String>("", arrayListOf()<!UNSUPPORTED_FEATURE!>,<!> <!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
@@ -39,7 +39,7 @@ interface Test<in I, out O, P> {
|
||||
fun neOk11(i: Inv<in <!TYPE_VARIANCE_CONFLICT("I", "in", "out", "Inv<in I>")!>I<!>>)
|
||||
fun neOk12(i: Inv<out <!TYPE_VARIANCE_CONFLICT("O", "out", "in", "Inv<out O>")!>O<!>>)
|
||||
|
||||
fun neOk30(i: Pair<<!TYPE_VARIANCE_CONFLICT("O", "out", "in", "Pair<O, [ERROR : No type element]>")!>O<!>, <!SYNTAX!><!>>)
|
||||
fun neOk30(i: Pair<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><O<!UNSUPPORTED_FEATURE!>,<!> ><!>)
|
||||
fun neOk31(i: Pair<<!TYPE_VARIANCE_CONFLICT("O", "out", "in", "Pair<O, [ERROR : Inv]>")!>O<!>, <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Inv<!>>)
|
||||
fun neOk32(i: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Inv<!>)
|
||||
fun neOk33(i: Inv<<!SYNTAX!><!>>)
|
||||
|
||||
@@ -43,7 +43,7 @@ public interface Test</*0*/ in I, /*1*/ out O, /*2*/ P> {
|
||||
public abstract fun neOk12(/*0*/ i: Inv<out O>): kotlin.Unit
|
||||
public abstract fun neOk2(/*0*/ i: In<I>): kotlin.Unit
|
||||
public abstract fun neOk3(/*0*/ i: In<In<O>>): kotlin.Unit
|
||||
public abstract fun neOk30(/*0*/ i: Pair<O, [ERROR : No type element]>): kotlin.Unit
|
||||
public abstract fun neOk30(/*0*/ i: [ERROR : Pair]<O>): kotlin.Unit
|
||||
public abstract fun neOk31(/*0*/ i: Pair<O, [ERROR : Inv]>): kotlin.Unit
|
||||
public abstract fun neOk32(/*0*/ i: [ERROR : Inv]): kotlin.Unit
|
||||
public abstract fun neOk33(/*0*/ i: Inv<[ERROR : No type element]>): kotlin.Unit
|
||||
|
||||
@@ -36,7 +36,7 @@ interface Test<in I, out O, P> {
|
||||
var neOk22: Inv<out <!TYPE_VARIANCE_CONFLICT("O", "out", "invariant", "Inv<out O>")!>O<!>>
|
||||
var neOk23: Inv<out <!TYPE_VARIANCE_CONFLICT("I", "in", "invariant", "Inv<out I>")!>I<!>>
|
||||
|
||||
var neOk30: Pair<<!TYPE_VARIANCE_CONFLICT("I", "in", "invariant", "Pair<I, [ERROR : No type element]>")!>I<!>, <!SYNTAX!><!>>
|
||||
var neOk30: Pair<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><I<!UNSUPPORTED_FEATURE!>,<!> ><!>
|
||||
var neOk31: Pair<<!TYPE_VARIANCE_CONFLICT("I", "in", "invariant", "Pair<I, [ERROR : Inv]>")!>I<!>, <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Inv<!>>
|
||||
var neOk32: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Inv<!>
|
||||
var neOk33: Inv<<!SYNTAX!><!>>
|
||||
|
||||
@@ -40,7 +40,7 @@ public interface Test</*0*/ in I, /*1*/ out O, /*2*/ P> {
|
||||
public abstract var neOk22: Inv<out O>
|
||||
public abstract var neOk23: Inv<out I>
|
||||
public abstract var neOk3: In<In<O>>
|
||||
public abstract var neOk30: Pair<I, [ERROR : No type element]>
|
||||
public abstract var neOk30: [ERROR : Pair]<I>
|
||||
public abstract var neOk31: Pair<I, [ERROR : Inv]>
|
||||
public abstract var neOk32: [ERROR : Inv]
|
||||
public abstract var neOk33: Inv<[ERROR : No type element]>
|
||||
|
||||
@@ -31,7 +31,7 @@ interface Test<in I, out O, P> {
|
||||
fun neOk10(): Inv<in <!TYPE_VARIANCE_CONFLICT("O", "out", "in", "Inv<in O>")!>O<!>>
|
||||
fun neOk11(): Inv<out <!TYPE_VARIANCE_CONFLICT("I", "in", "out", "Inv<out I>")!>I<!>>
|
||||
|
||||
fun neOk30(): Pair<<!TYPE_VARIANCE_CONFLICT("I", "in", "out", "Pair<I, [ERROR : No type element]>")!>I<!>, <!SYNTAX!><!>>
|
||||
fun neOk30(): Pair<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><I<!UNSUPPORTED_FEATURE!>,<!> ><!>
|
||||
fun neOk31(): Pair<<!TYPE_VARIANCE_CONFLICT("I", "in", "out", "Pair<I, [ERROR : Inv]>")!>I<!>, <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Inv<!>>
|
||||
fun neOk32(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Inv<!>
|
||||
fun neOk33(): Inv<<!SYNTAX!><!>>
|
||||
|
||||
@@ -32,7 +32,7 @@ public interface Test</*0*/ in I, /*1*/ out O, /*2*/ P> {
|
||||
public abstract fun neOk11(): Inv<out I>
|
||||
public abstract fun neOk2(): In<O>
|
||||
public abstract fun neOk3(): In<In<I>>
|
||||
public abstract fun neOk30(): Pair<I, [ERROR : No type element]>
|
||||
public abstract fun neOk30(): [ERROR : Pair]<I>
|
||||
public abstract fun neOk31(): Pair<I, [ERROR : Inv]>
|
||||
public abstract fun neOk32(): [ERROR : Inv]
|
||||
public abstract fun neOk33(): Inv<[ERROR : No type element]>
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_DESTRUCTURED_PARAMETER_ENTRY, -UNUSED_ANONYMOUS_PARAMETER
|
||||
|
||||
data class Foo1(val x: String, val y: String, val z: String = "")
|
||||
|
||||
fun main() {
|
||||
val (x1,y1<!UNSUPPORTED_FEATURE!>,<!>) = Pair(1,2)
|
||||
val (x2, y2: Number<!UNSUPPORTED_FEATURE!>,<!>) = Pair(1,2)
|
||||
val (x3,y3,z3<!UNSUPPORTED_FEATURE!>,<!>) = Foo1("", ""<!UNSUPPORTED_FEATURE!>,<!> )
|
||||
val (x4,y4: CharSequence<!UNSUPPORTED_FEATURE!>,<!>) = Foo1("", "", ""<!UNSUPPORTED_FEATURE!>,<!>)
|
||||
val (x41,y41: CharSequence<!UNSUPPORTED_FEATURE!>,<!>/**/) = Foo1("", "", ""<!UNSUPPORTED_FEATURE!>,<!>)
|
||||
|
||||
val x5: (Pair<Int, Int>, Int) -> Unit = { (x,y<!UNSUPPORTED_FEATURE!>,<!>),z<!UNSUPPORTED_FEATURE!>,<!> -> }
|
||||
val x6: (Foo1, Int) -> Any = { (x,y,z: CharSequence<!UNSUPPORTED_FEATURE!>,<!>), z1: Number<!UNSUPPORTED_FEATURE!>,<!> -> 1 }
|
||||
val x61: (Foo1, Int) -> Any = { (x,y,z: CharSequence<!UNSUPPORTED_FEATURE!>,<!>/**/), z1: Number<!UNSUPPORTED_FEATURE!>,<!>/**/ -> 1 }
|
||||
|
||||
for ((i, j<!UNSUPPORTED_FEATURE!>,<!>) in listOf(Pair(1,2))) {}
|
||||
for ((i: Any<!UNSUPPORTED_FEATURE!>,<!>) in listOf(Pair(1,2))) {}
|
||||
for ((i: Any<!UNSUPPORTED_FEATURE!>,<!>/**/) in listOf(Pair(1,2))) {}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public final data class Foo1 {
|
||||
public constructor Foo1(/*0*/ x: kotlin.String, /*1*/ y: kotlin.String, /*2*/ z: kotlin.String = ...)
|
||||
public final val x: kotlin.String
|
||||
public final val y: kotlin.String
|
||||
public final val z: kotlin.String
|
||||
public final operator /*synthesized*/ fun component1(): kotlin.String
|
||||
public final operator /*synthesized*/ fun component2(): kotlin.String
|
||||
public final operator /*synthesized*/ fun component3(): kotlin.String
|
||||
public final /*synthesized*/ fun copy(/*0*/ x: kotlin.String = ..., /*1*/ y: kotlin.String = ..., /*2*/ z: kotlin.String = ...): Foo1
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_DESTRUCTURED_PARAMETER_ENTRY, -UNUSED_ANONYMOUS_PARAMETER
|
||||
// !LANGUAGE: +TrailingCommas
|
||||
|
||||
data class Foo1(val x: String, val y: String, val z: String = "")
|
||||
|
||||
fun main() {
|
||||
val (x1,y1,) = Pair(1, 2)
|
||||
val (x2, y2: Number,) = Pair(1,2)
|
||||
val (x3,y3,z3,) = Foo1("", "",)
|
||||
val (x4,y4: CharSequence,) = Foo1("", "", "",)
|
||||
val (x41,y41: CharSequence,/**/) = Foo1("", "", "",)
|
||||
|
||||
val x5: (Pair<Int, Int>, Int) -> Unit = { (x,y,),z, -> }
|
||||
val x6: (Foo1, Int) -> Any = { (x,y,z: CharSequence,), z2: Number, -> 1 }
|
||||
val x61: (Foo1, Int) -> Any = { (x,y,z: CharSequence,/**/), z2: Number,/**/ -> 1 }
|
||||
|
||||
for ((i, j) in listOf(Pair(1,2))) {}
|
||||
for ((i: Any,) in listOf(Pair(1,2))) {}
|
||||
for ((i: Any,/**/) in listOf(Pair(1,2))) {}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public final data class Foo1 {
|
||||
public constructor Foo1(/*0*/ x: kotlin.String, /*1*/ y: kotlin.String, /*2*/ z: kotlin.String = ...)
|
||||
public final val x: kotlin.String
|
||||
public final val y: kotlin.String
|
||||
public final val z: kotlin.String
|
||||
public final operator /*synthesized*/ fun component1(): kotlin.String
|
||||
public final operator /*synthesized*/ fun component2(): kotlin.String
|
||||
public final operator /*synthesized*/ fun component3(): kotlin.String
|
||||
public final /*synthesized*/ fun copy(/*0*/ x: kotlin.String = ..., /*1*/ y: kotlin.String = ..., /*2*/ z: kotlin.String = ...): Foo1
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
|
||||
// !LANGUAGE: +TrailingCommas
|
||||
|
||||
fun foo(vararg x: Int) = false
|
||||
fun foo() = true
|
||||
|
||||
fun main() {
|
||||
val x = foo()
|
||||
val y = foo(<!SYNTAX!>,<!><!SYNTAX!><!>)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package
|
||||
|
||||
public fun foo(): kotlin.Boolean
|
||||
public fun foo(/*0*/ vararg x: kotlin.Int /*kotlin.IntArray*/): kotlin.Boolean
|
||||
public fun main(): kotlin.Unit
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_TYPEALIAS_PARAMETER, -CAST_NEVER_SUCCEEDS
|
||||
|
||||
class Foo1<T1> {}
|
||||
|
||||
interface Foo2<T1<!UNSUPPORTED_FEATURE!>,<!>>
|
||||
|
||||
fun <T1, T2, T3>foo3() {}
|
||||
|
||||
typealias Foo4<T1,T2,T3,T4> = Int
|
||||
|
||||
class Foo5<T, K: T<!UNSUPPORTED_FEATURE!>,<!>>: Foo2<K<!UNSUPPORTED_FEATURE!>,<!>>
|
||||
|
||||
fun <T> foo() {
|
||||
val x1 = Foo1<Int,>()
|
||||
val x2: Foo2<Int<!UNSUPPORTED_FEATURE!>,<!>>? = null
|
||||
val x21: Foo2<Int<!UNSUPPORTED_FEATURE!>,<!>/**/>? = null
|
||||
val x3 = foo3<
|
||||
Int,
|
||||
String,
|
||||
Float,
|
||||
>()
|
||||
val x4: Foo4<Comparable<Int<!UNSUPPORTED_FEATURE!>,<!>>, Iterable<Comparable<Float<!UNSUPPORTED_FEATURE!>,<!>><!UNSUPPORTED_FEATURE!>,<!>>, Double, T<!UNSUPPORTED_FEATURE!>,<!>
|
||||
>? = null as Foo4<Comparable<Int<!UNSUPPORTED_FEATURE!>,<!>>, Iterable<Comparable<Float<!UNSUPPORTED_FEATURE!>,<!>><!UNSUPPORTED_FEATURE!>,<!>>, Double, T<!UNSUPPORTED_FEATURE!>,<!>>
|
||||
val x5: (Float<!UNSUPPORTED_FEATURE!>,<!>) -> Unit = {}
|
||||
val x6: Pair<(Float, Comparable<T<!UNSUPPORTED_FEATURE!>,<!>><!UNSUPPORTED_FEATURE!>,<!>) -> Unit, (Float<!UNSUPPORTED_FEATURE!>,<!>) -> Unit<!UNSUPPORTED_FEATURE!>,<!>>? = null
|
||||
val x61: Pair<(Float, Comparable<T<!UNSUPPORTED_FEATURE!>,<!>/**/><!UNSUPPORTED_FEATURE!>,<!>/**/) -> Unit, (Float<!UNSUPPORTED_FEATURE!>,<!>/**/) -> Unit<!UNSUPPORTED_FEATURE!>,<!>/**/>? = null
|
||||
}
|
||||
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> foo(): kotlin.Unit
|
||||
public fun </*0*/ T1, /*1*/ T2, /*2*/ T3> foo3(): kotlin.Unit
|
||||
|
||||
public final class Foo1</*0*/ T1> {
|
||||
public constructor Foo1</*0*/ T1>()
|
||||
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
|
||||
}
|
||||
|
||||
public interface Foo2</*0*/ T1> {
|
||||
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
|
||||
}
|
||||
|
||||
public final class Foo5</*0*/ T, /*1*/ K : T> : Foo2<K> {
|
||||
public constructor Foo5</*0*/ T, /*1*/ K : T>()
|
||||
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
|
||||
}
|
||||
public typealias Foo4</*0*/ T1, /*1*/ T2, /*2*/ T3, /*3*/ T4> = kotlin.Int
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_TYPEALIAS_PARAMETER, -CAST_NEVER_SUCCEEDS
|
||||
// !LANGUAGE: +TrailingCommas
|
||||
|
||||
class Foo1<T1> {}
|
||||
|
||||
interface Foo2<T1,>
|
||||
|
||||
fun <T1, T2, T3>foo3() {}
|
||||
|
||||
typealias Foo4<T1,T2,T3,T4> = Int
|
||||
|
||||
class Foo5<T, K: T,>: Foo2<K,>
|
||||
|
||||
fun <T>foo () {
|
||||
val x1 = Foo1<Int,>()
|
||||
val x2: Foo2<Int,>? = null
|
||||
val x21: Foo2<Int,/**/>? = null
|
||||
val x3 = foo3<
|
||||
Int,
|
||||
String,
|
||||
Float,
|
||||
>()
|
||||
val x4: Foo4<Comparable<Int,>, Iterable<Comparable<Float,>,>, Double, T,
|
||||
>? = null as Foo4<Comparable<Int,>, Iterable<Comparable<Float,>,>, Double, T,>
|
||||
val x5: (Float,) -> Unit = {}
|
||||
val x6: Pair<(Float, Comparable<T,>,) -> Unit, (Float,) -> Unit,>? = null
|
||||
val x61: Pair<(Float, Comparable<T,/**/>,/**/) -> Unit, (Float,/**/) -> Unit,/**/>? = null
|
||||
}
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> foo(): kotlin.Unit
|
||||
public fun </*0*/ T1, /*1*/ T2, /*2*/ T3> foo3(): kotlin.Unit
|
||||
|
||||
public final class Foo1</*0*/ T1> {
|
||||
public constructor Foo1</*0*/ T1>()
|
||||
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
|
||||
}
|
||||
|
||||
public interface Foo2</*0*/ T1> {
|
||||
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
|
||||
}
|
||||
|
||||
public final class Foo5</*0*/ T, /*1*/ K : T> : Foo2<K> {
|
||||
public constructor Foo5</*0*/ T, /*1*/ K : T>()
|
||||
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
|
||||
}
|
||||
public typealias Foo4</*0*/ T1, /*1*/ T2, /*2*/ T3, /*3*/ T4> = kotlin.Int
|
||||
Vendored
+48
@@ -0,0 +1,48 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_TYPEALIAS_PARAMETER
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno
|
||||
|
||||
class Foo1<T1<!UNSUPPORTED_FEATURE!>,<!>>
|
||||
|
||||
class Foo2<
|
||||
T1,
|
||||
T2: T1<!UNSUPPORTED_FEATURE!>,<!>
|
||||
> {
|
||||
fun <T1,
|
||||
T2<!UNSUPPORTED_FEATURE!>,<!> > foo2() {}
|
||||
|
||||
internal inner class B<T,T2<!UNSUPPORTED_FEATURE!>,<!>>
|
||||
}
|
||||
|
||||
interface A<T<!UNSUPPORTED_FEATURE!>,<!>>
|
||||
|
||||
interface A1<T<!UNSUPPORTED_FEATURE!>,<!>/**/>
|
||||
|
||||
fun <T<!UNSUPPORTED_FEATURE!>,<!>> foo1() {}
|
||||
|
||||
fun <T<!UNSUPPORTED_FEATURE!>,<!>/**/> foo11() {}
|
||||
|
||||
fun <T1,
|
||||
T2<!UNSUPPORTED_FEATURE!>,<!>
|
||||
> T2?.foo2() {}
|
||||
|
||||
val <T<!UNSUPPORTED_FEATURE!>,<!>> T.bar1 get() = null
|
||||
|
||||
var <
|
||||
T4<!UNSUPPORTED_FEATURE!>,<!>
|
||||
> T4?.bar2
|
||||
get() = null
|
||||
set(value) {
|
||||
|
||||
}
|
||||
|
||||
typealias Foo3<T1, @Anno T2<!UNSUPPORTED_FEATURE!>,<!>> = List<T2>
|
||||
|
||||
typealias Foo4<T1, @Anno T2<!UNSUPPORTED_FEATURE!>,<!>/**/> = List<T2>
|
||||
|
||||
fun main() {
|
||||
fun <T<!UNSUPPORTED_FEATURE!>,<!>> foo10() {
|
||||
fun <T1,T2,T3<!UNSUPPORTED_FEATURE!>,<!>> foo10() {}
|
||||
}
|
||||
}
|
||||
Vendored
+51
@@ -0,0 +1,51 @@
|
||||
package
|
||||
|
||||
public val </*0*/ T> T.bar1: kotlin.Nothing?
|
||||
public var </*0*/ T4> T4?.bar2: kotlin.Nothing?
|
||||
public fun </*0*/ T> foo1(): kotlin.Unit
|
||||
public fun </*0*/ T> foo11(): kotlin.Unit
|
||||
public fun main(): kotlin.Unit
|
||||
public fun </*0*/ T1, /*1*/ T2> T2?.foo2(): kotlin.Unit
|
||||
|
||||
public interface A</*0*/ T> {
|
||||
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
|
||||
}
|
||||
|
||||
public interface A1</*0*/ T> {
|
||||
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.annotation.Target(allowedTargets = {AnnotationTarget.TYPE}) public final annotation class Anno : kotlin.Annotation {
|
||||
public constructor Anno()
|
||||
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
|
||||
}
|
||||
|
||||
public final class Foo1</*0*/ T1> {
|
||||
public constructor Foo1</*0*/ T1>()
|
||||
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
|
||||
}
|
||||
|
||||
public final class Foo2</*0*/ T1, /*1*/ T2 : T1> {
|
||||
public constructor Foo2</*0*/ T1, /*1*/ T2 : T1>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun </*0*/ T1, /*1*/ T2> foo2(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
internal final inner class B</*0*/ T, /*1*/ T2> /*captured type parameters: /*2*/ T1, /*3*/ T2 : T1*/ {
|
||||
public constructor B</*0*/ T, /*1*/ T2>()
|
||||
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
|
||||
}
|
||||
}
|
||||
public typealias Foo3</*0*/ T1, /*1*/ @Anno T2> = kotlin.collections.List<T2>
|
||||
public typealias Foo4</*0*/ T1, /*1*/ @Anno T2> = kotlin.collections.List<T2>
|
||||
Vendored
+51
@@ -0,0 +1,51 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_TYPEALIAS_PARAMETER
|
||||
// !LANGUAGE: +TrailingCommas
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno
|
||||
|
||||
class Foo1<T1,>
|
||||
|
||||
class Foo2<
|
||||
T1,
|
||||
T2: T1,
|
||||
> {
|
||||
fun <T1,
|
||||
T2, > foo2() {}
|
||||
|
||||
internal inner class B<T,T2,>
|
||||
}
|
||||
|
||||
interface A<T,>
|
||||
|
||||
interface A1<T,/**/>
|
||||
|
||||
fun <T,> foo1() {}
|
||||
|
||||
fun <T,/**/> foo11() {}
|
||||
|
||||
inline fun <reified T1, T2, reified T3,> foo2() {}
|
||||
|
||||
fun <T1,
|
||||
T2,
|
||||
> T2?.foo3() {}
|
||||
|
||||
val <T,> T.bar1 get() = null
|
||||
|
||||
var <
|
||||
T4,
|
||||
> T4?.bar2
|
||||
get() = null
|
||||
set(value) {
|
||||
|
||||
}
|
||||
|
||||
typealias Foo3<T1, @Anno T2,> = List<T2>
|
||||
|
||||
typealias Foo4<T1, @Anno T2,/**/> = List<T2>
|
||||
|
||||
fun main() {
|
||||
fun <T,> foo10() {
|
||||
fun <T1,T2,T3,> foo10() {}
|
||||
}
|
||||
}
|
||||
Vendored
+52
@@ -0,0 +1,52 @@
|
||||
package
|
||||
|
||||
public val </*0*/ T> T.bar1: kotlin.Nothing?
|
||||
public var </*0*/ T4> T4?.bar2: kotlin.Nothing?
|
||||
public fun </*0*/ T> foo1(): kotlin.Unit
|
||||
public fun </*0*/ T> foo11(): kotlin.Unit
|
||||
public inline fun </*0*/ reified T1, /*1*/ T2, /*2*/ reified T3> foo2(): kotlin.Unit
|
||||
public fun main(): kotlin.Unit
|
||||
public fun </*0*/ T1, /*1*/ T2> T2?.foo3(): kotlin.Unit
|
||||
|
||||
public interface A</*0*/ T> {
|
||||
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
|
||||
}
|
||||
|
||||
public interface A1</*0*/ T> {
|
||||
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.annotation.Target(allowedTargets = {AnnotationTarget.TYPE}) public final annotation class Anno : kotlin.Annotation {
|
||||
public constructor Anno()
|
||||
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
|
||||
}
|
||||
|
||||
public final class Foo1</*0*/ T1> {
|
||||
public constructor Foo1</*0*/ T1>()
|
||||
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
|
||||
}
|
||||
|
||||
public final class Foo2</*0*/ T1, /*1*/ T2 : T1> {
|
||||
public constructor Foo2</*0*/ T1, /*1*/ T2 : T1>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun </*0*/ T1, /*1*/ T2> foo2(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
internal final inner class B</*0*/ T, /*1*/ T2> /*captured type parameters: /*2*/ T1, /*3*/ T2 : T1*/ {
|
||||
public constructor B</*0*/ T, /*1*/ T2>()
|
||||
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
|
||||
}
|
||||
}
|
||||
public typealias Foo3</*0*/ T1, /*1*/ @Anno T2> = kotlin.collections.List<T2>
|
||||
public typealias Foo4</*0*/ T1, /*1*/ @Anno T2> = kotlin.collections.List<T2>
|
||||
Vendored
+73
@@ -0,0 +1,73 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE, -UNUSED_ANONYMOUS_PARAMETER
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno1(val x: IntArray)
|
||||
|
||||
@Target(AnnotationTarget.TYPEALIAS)
|
||||
annotation class Anno2(val x: DoubleArray)
|
||||
|
||||
fun foo1(vararg x: Any) {}
|
||||
fun foo2(x: (Any, Any) -> Unit) {}
|
||||
fun foo3(x: Any, y: () -> Unit) {}
|
||||
|
||||
open class A1(vararg x: Any) {
|
||||
operator fun get(x: Any, y: Any) = 10
|
||||
}
|
||||
|
||||
open class A2(x: Int, y: () -> Unit) {}
|
||||
|
||||
class B(): A1({}<!UNSUPPORTED_FEATURE!>,<!>) {
|
||||
|
||||
}
|
||||
|
||||
@Anno2(
|
||||
[
|
||||
0.4,
|
||||
.1<!UNSUPPORTED_FEATURE!>,<!>
|
||||
]
|
||||
)
|
||||
typealias A3 = B
|
||||
|
||||
fun main1() {
|
||||
foo1(1, 2, 3<!UNSUPPORTED_FEATURE!>,<!>)
|
||||
foo1({}<!UNSUPPORTED_FEATURE!>,<!>)
|
||||
foo3(10<!UNSUPPORTED_FEATURE!>,<!>) {}
|
||||
foo3(10<!UNSUPPORTED_FEATURE!>,<!>/**/) {}
|
||||
|
||||
val x1 = A1(1, 2, 3<!UNSUPPORTED_FEATURE!>,<!>)
|
||||
val y1 = A1({}<!UNSUPPORTED_FEATURE!>,<!>)
|
||||
val z1 = A2(10<!UNSUPPORTED_FEATURE!>,<!>) {}
|
||||
|
||||
foo2({ x, y -> kotlin.Unit }<!UNSUPPORTED_FEATURE!>,<!>)
|
||||
foo2({ x, y -> kotlin.Unit }<!UNSUPPORTED_FEATURE!>,<!>/**/)
|
||||
|
||||
val foo = listOf(
|
||||
println(1),
|
||||
"foo bar something"<!UNSUPPORTED_FEATURE!>,<!>
|
||||
)
|
||||
|
||||
val x2 = x1[
|
||||
1,
|
||||
2<!UNSUPPORTED_FEATURE!>,<!>
|
||||
]
|
||||
|
||||
val x3 = x1[{},{}<!UNSUPPORTED_FEATURE!>,<!>]
|
||||
val x31 = x1[{},{}<!UNSUPPORTED_FEATURE!>,<!>/**/]
|
||||
|
||||
val x4: @Anno1([
|
||||
1, 2<!UNSUPPORTED_FEATURE!>,<!>
|
||||
]) Float = 0f
|
||||
|
||||
foo1(object {}<!UNSUPPORTED_FEATURE!>,<!>)
|
||||
foo1(object {}<!UNSUPPORTED_FEATURE!>,<!>/**/)
|
||||
foo1(fun () {}<!UNSUPPORTED_FEATURE!>,<!>)
|
||||
foo1(if (true) 1 else 2<!UNSUPPORTED_FEATURE!>,<!>)
|
||||
|
||||
<!UNREACHABLE_CODE!>foo1(<!>return<!UNSUPPORTED_FEATURE!>,<!><!UNREACHABLE_CODE!>)<!>
|
||||
}
|
||||
|
||||
fun main2(x: A1) {
|
||||
<!UNREACHABLE_CODE!>val x1 =<!> x[object {}, return<!UNSUPPORTED_FEATURE!>,<!> ]
|
||||
<!UNREACHABLE_CODE!>val x2 = x[fun () {}, throw Exception()<!UNSUPPORTED_FEATURE!>,<!> ]<!>
|
||||
<!UNREACHABLE_CODE!>val x3 = x[fun () {}, throw Exception()<!UNSUPPORTED_FEATURE!>,<!>/**/ ]<!>
|
||||
}
|
||||
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
package
|
||||
|
||||
public fun foo1(/*0*/ vararg x: kotlin.Any /*kotlin.Array<out kotlin.Any>*/): kotlin.Unit
|
||||
public fun foo2(/*0*/ x: (kotlin.Any, kotlin.Any) -> kotlin.Unit): kotlin.Unit
|
||||
public fun foo3(/*0*/ x: kotlin.Any, /*1*/ y: () -> kotlin.Unit): kotlin.Unit
|
||||
public fun main1(): kotlin.Unit
|
||||
public fun main2(/*0*/ x: A1): kotlin.Unit
|
||||
|
||||
public open class A1 {
|
||||
public constructor A1(/*0*/ vararg x: kotlin.Any /*kotlin.Array<out kotlin.Any>*/)
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final operator fun get(/*0*/ x: kotlin.Any, /*1*/ y: kotlin.Any): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class A2 {
|
||||
public constructor A2(/*0*/ x: kotlin.Int, /*1*/ y: () -> kotlin.Unit)
|
||||
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.annotation.Target(allowedTargets = {AnnotationTarget.TYPE}) public final annotation class Anno1 : kotlin.Annotation {
|
||||
public constructor Anno1(/*0*/ x: kotlin.IntArray)
|
||||
public final val x: kotlin.IntArray
|
||||
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.annotation.Target(allowedTargets = {AnnotationTarget.TYPEALIAS}) public final annotation class Anno2 : kotlin.Annotation {
|
||||
public constructor Anno2(/*0*/ x: kotlin.DoubleArray)
|
||||
public final val x: kotlin.DoubleArray
|
||||
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
|
||||
}
|
||||
|
||||
public final class B : A1 {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun get(/*0*/ x: kotlin.Any, /*1*/ y: kotlin.Any): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@Anno2(x = {0.4.toDouble(), 0.1.toDouble()}) public typealias A3 = B
|
||||
Vendored
+69
@@ -0,0 +1,69 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE, -UNUSED_ANONYMOUS_PARAMETER
|
||||
// !LANGUAGE: +TrailingCommas
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno1(val x: IntArray)
|
||||
|
||||
@Target(AnnotationTarget.TYPEALIAS)
|
||||
annotation class Anno2(val x: DoubleArray)
|
||||
|
||||
fun foo1(vararg x: Any) {}
|
||||
fun foo2(x: (Any, Any) -> Unit) {}
|
||||
fun foo3(x: Any, y: () -> Unit) {}
|
||||
|
||||
open class A1(vararg x: Any) {
|
||||
operator fun get(x: Any, y: Any) = 10
|
||||
}
|
||||
|
||||
open class A2(x: Any, y: () -> Unit)
|
||||
|
||||
class B(): A1({},) {
|
||||
|
||||
}
|
||||
|
||||
@Anno2(
|
||||
[
|
||||
0.4,
|
||||
.1,
|
||||
]
|
||||
)
|
||||
typealias A3 = B
|
||||
|
||||
fun main1() {
|
||||
foo1(1, 2, 3,/**/)
|
||||
foo1({},)
|
||||
foo3(10,/**/) {}
|
||||
|
||||
val x1 = A1(1, 2, 3,)
|
||||
val y1 = A1({},)
|
||||
val z1 = A2(10,) {}
|
||||
|
||||
foo2({ x, y -> kotlin.Unit },/**/)
|
||||
|
||||
val foo = listOf(
|
||||
println(1),
|
||||
"foo bar something",
|
||||
)
|
||||
|
||||
val x2 = x1[
|
||||
1,
|
||||
2,
|
||||
]
|
||||
|
||||
val x3 = x1[{},{},/**/]
|
||||
|
||||
val x4: @Anno1([
|
||||
1, 2,/**/
|
||||
]) Float = 0f
|
||||
|
||||
foo1(object {},)
|
||||
foo1(fun () {},)
|
||||
foo1(if (true) 1 else 2,/**/)
|
||||
|
||||
<!UNREACHABLE_CODE!>foo1(<!>return,<!UNREACHABLE_CODE!>)<!>
|
||||
}
|
||||
|
||||
fun main2(x: A1) {
|
||||
<!UNREACHABLE_CODE!>val x1 =<!> x[object {}, return, ]
|
||||
<!UNREACHABLE_CODE!>val x2 = x[fun () {}, throw Exception(), /**/]<!>
|
||||
}
|
||||
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
package
|
||||
|
||||
public fun foo1(/*0*/ vararg x: kotlin.Any /*kotlin.Array<out kotlin.Any>*/): kotlin.Unit
|
||||
public fun foo2(/*0*/ x: (kotlin.Any, kotlin.Any) -> kotlin.Unit): kotlin.Unit
|
||||
public fun foo3(/*0*/ x: kotlin.Any, /*1*/ y: () -> kotlin.Unit): kotlin.Unit
|
||||
public fun main1(): kotlin.Unit
|
||||
public fun main2(/*0*/ x: A1): kotlin.Unit
|
||||
|
||||
public open class A1 {
|
||||
public constructor A1(/*0*/ vararg x: kotlin.Any /*kotlin.Array<out kotlin.Any>*/)
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final operator fun get(/*0*/ x: kotlin.Any, /*1*/ y: kotlin.Any): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class A2 {
|
||||
public constructor A2(/*0*/ x: kotlin.Any, /*1*/ y: () -> kotlin.Unit)
|
||||
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.annotation.Target(allowedTargets = {AnnotationTarget.TYPE}) public final annotation class Anno1 : kotlin.Annotation {
|
||||
public constructor Anno1(/*0*/ x: kotlin.IntArray)
|
||||
public final val x: kotlin.IntArray
|
||||
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.annotation.Target(allowedTargets = {AnnotationTarget.TYPEALIAS}) public final annotation class Anno2 : kotlin.Annotation {
|
||||
public constructor Anno2(/*0*/ x: kotlin.DoubleArray)
|
||||
public final val x: kotlin.DoubleArray
|
||||
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
|
||||
}
|
||||
|
||||
public final class B : A1 {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun get(/*0*/ x: kotlin.Any, /*1*/ y: kotlin.Any): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@Anno2(x = {0.4.toDouble(), 0.1.toDouble()}) public typealias A3 = B
|
||||
Vendored
+120
@@ -0,0 +1,120 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
open class Foo1(x: Int = 10, y: Float = 0f<!UNSUPPORTED_FEATURE!>,<!>)
|
||||
|
||||
class Foo2(
|
||||
val x: Int = 10,
|
||||
var y: Float<!UNSUPPORTED_FEATURE!>,<!>
|
||||
): Foo1(x, y<!UNSUPPORTED_FEATURE!>,<!>) {
|
||||
constructor(
|
||||
x: Float,
|
||||
y: Int = 10<!UNSUPPORTED_FEATURE!>,<!>
|
||||
): this(1, 1f<!UNSUPPORTED_FEATURE!>,<!>) {}
|
||||
|
||||
var x1: Int
|
||||
get() = 10
|
||||
set(value<!UNSUPPORTED_FEATURE!>,<!>) {
|
||||
|
||||
}
|
||||
|
||||
var x2: Int
|
||||
get() = 10
|
||||
set(
|
||||
x2<!UNSUPPORTED_FEATURE!>,<!>
|
||||
) {}
|
||||
|
||||
var x3: (Int) -> Unit
|
||||
get() = {}
|
||||
set(x2: (Int) -> Unit<!UNSUPPORTED_FEATURE!>,<!>) {}
|
||||
|
||||
var x4: (Int) -> Unit
|
||||
get() = {}
|
||||
set(x2: (Int) -> Unit<!UNSUPPORTED_FEATURE!>,<!>/**/) {}
|
||||
}
|
||||
|
||||
enum class Foo3(x: Int<!UNSUPPORTED_FEATURE!>,<!> )
|
||||
|
||||
fun foo4(x: Int, y: Comparable<Float><!UNSUPPORTED_FEATURE!>,<!>) {}
|
||||
|
||||
fun foo5(x: Int = 10<!UNSUPPORTED_FEATURE!>,<!>) {}
|
||||
|
||||
fun foo6(vararg x: Int<!UNSUPPORTED_FEATURE!>,<!>) {}
|
||||
|
||||
fun foo7(y: Float, vararg x: Int<!UNSUPPORTED_FEATURE!>,<!>) {}
|
||||
|
||||
val foo8: (Int, Int<!UNSUPPORTED_FEATURE!>,<!>) -> Int = fun(
|
||||
x,
|
||||
y<!UNSUPPORTED_FEATURE!>,<!>
|
||||
): Int {
|
||||
return x + y
|
||||
}
|
||||
|
||||
val foo9: (Int, Int, Int<!UNSUPPORTED_FEATURE!>,<!>) -> Int =
|
||||
fun (x, y: Int, z<!UNSUPPORTED_FEATURE!>,<!>): Int {
|
||||
return x + y
|
||||
}
|
||||
|
||||
open class Foo10(x: Int = 10, y: Float = 0f)
|
||||
|
||||
class Foo11: Foo10 {
|
||||
constructor(
|
||||
x: Float
|
||||
): super(1, 1f<!UNSUPPORTED_FEATURE!>,<!>)
|
||||
}
|
||||
|
||||
class Foo12: Foo10 {
|
||||
constructor(
|
||||
x: Float
|
||||
): super(1, 1f<!UNSUPPORTED_FEATURE!>,<!>/**/)
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val x1 = {
|
||||
x: Comparable<Comparable<Number>>,
|
||||
y: Iterable<Iterable<Number>><!UNSUPPORTED_FEATURE!>,<!>
|
||||
->
|
||||
println("1")
|
||||
}
|
||||
val x2 = { x: Comparable<Comparable<Number>><!UNSUPPORTED_FEATURE!>,<!>
|
||||
-> println("1")
|
||||
}
|
||||
val x3: ((Int<!UNSUPPORTED_FEATURE!>,<!>) -> Int) -> Unit = { x: (Int<!UNSUPPORTED_FEATURE!>,<!>) -> Int<!UNSUPPORTED_FEATURE!>,<!> -> println("1") }
|
||||
val x4: ((Int<!UNSUPPORTED_FEATURE!>,<!>) -> Int) -> Unit = { x<!UNSUPPORTED_FEATURE!>,<!> -> println("1") }
|
||||
|
||||
fun foo10(x:Int,y:Int<!UNSUPPORTED_FEATURE!>,<!>) {
|
||||
fun foo10(x:Int,y:Int<!UNSUPPORTED_FEATURE!>,<!>) {}
|
||||
}
|
||||
fun foo101(x:Int,y:Int<!UNSUPPORTED_FEATURE!>,<!>/**/) {
|
||||
fun foo10(x:Int,y:Int<!UNSUPPORTED_FEATURE!>,<!>/**/) {}
|
||||
}
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception<!UNSUPPORTED_FEATURE!>,<!>) {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception<!UNSUPPORTED_FEATURE!>,<!>) {
|
||||
|
||||
} catch (e: Exception<!UNSUPPORTED_FEATURE!>,<!>) {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception<!UNSUPPORTED_FEATURE!>,<!>) {
|
||||
|
||||
} finally {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception<!UNSUPPORTED_FEATURE!>,<!>/**/) {
|
||||
|
||||
} finally {
|
||||
|
||||
}
|
||||
}
|
||||
Vendored
+68
@@ -0,0 +1,68 @@
|
||||
package
|
||||
|
||||
public val foo8: (kotlin.Int, kotlin.Int) -> kotlin.Int
|
||||
public val foo9: (kotlin.Int, kotlin.Int, kotlin.Int) -> kotlin.Int
|
||||
public fun foo4(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Comparable<kotlin.Float>): kotlin.Unit
|
||||
public fun foo5(/*0*/ x: kotlin.Int = ...): kotlin.Unit
|
||||
public fun foo6(/*0*/ vararg x: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit
|
||||
public fun foo7(/*0*/ y: kotlin.Float, /*1*/ vararg x: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public open class Foo1 {
|
||||
public constructor Foo1(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.Float = ...)
|
||||
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
|
||||
}
|
||||
|
||||
public open class Foo10 {
|
||||
public constructor Foo10(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.Float = ...)
|
||||
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
|
||||
}
|
||||
|
||||
public final class Foo11 : Foo10 {
|
||||
public constructor Foo11(/*0*/ x: kotlin.Float)
|
||||
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
|
||||
}
|
||||
|
||||
public final class Foo12 : Foo10 {
|
||||
public constructor Foo12(/*0*/ x: kotlin.Float)
|
||||
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
|
||||
}
|
||||
|
||||
public final class Foo2 : Foo1 {
|
||||
public constructor Foo2(/*0*/ x: kotlin.Float, /*1*/ y: kotlin.Int = ...)
|
||||
public constructor Foo2(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.Float)
|
||||
public final val x: kotlin.Int
|
||||
public final var x1: kotlin.Int
|
||||
public final var x2: kotlin.Int
|
||||
public final var x3: (kotlin.Int) -> kotlin.Unit
|
||||
public final var x4: (kotlin.Int) -> kotlin.Unit
|
||||
public final var y: kotlin.Float
|
||||
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
|
||||
}
|
||||
|
||||
public final enum class Foo3 : kotlin.Enum<Foo3> {
|
||||
private constructor Foo3(/*0*/ x: kotlin.Int)
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Foo3): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Foo3!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Foo3
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<Foo3>
|
||||
}
|
||||
Vendored
+104
@@ -0,0 +1,104 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_ANONYMOUS_PARAMETER, -UNUSED_VARIABLE
|
||||
// !LANGUAGE: +TrailingCommas
|
||||
|
||||
open class Foo1(x: Int = 10, y: Float = 0f,)
|
||||
|
||||
class Foo2(
|
||||
val x: Int = 10,
|
||||
var y: Float,
|
||||
): Foo1(x, y) {
|
||||
constructor(
|
||||
x: Float,
|
||||
y: Int = 10,
|
||||
): this(1, 1f,) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
enum class Foo3(x: Int, )
|
||||
|
||||
fun foo4(x: Int, y: Comparable<Float>,) {}
|
||||
|
||||
fun foo5(x: Int = 10,) {}
|
||||
|
||||
fun foo6(vararg x: Int,) {}
|
||||
|
||||
fun foo61(vararg x: Int,/**/) {}
|
||||
|
||||
fun foo7(y: Float, vararg x: Int,) {}
|
||||
|
||||
val foo8: (Int, Int,) -> Int = fun(
|
||||
x,
|
||||
y,
|
||||
): Int {
|
||||
return x + y
|
||||
}
|
||||
|
||||
val foo9: (Int, Int, Int,) -> Int =
|
||||
fun (x, y: Int, z,): Int {
|
||||
return x + y
|
||||
}
|
||||
|
||||
open class Foo10(x: Int = 10, y: Float = 0f)
|
||||
|
||||
class Foo11: Foo10 {
|
||||
constructor(
|
||||
x: Float
|
||||
): super(1, 1f,)
|
||||
}
|
||||
|
||||
class Foo12: Foo10 {
|
||||
constructor(
|
||||
x: Float
|
||||
): super(1, 1f,/**/)
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val x1 = {
|
||||
x: Comparable<Comparable<Number>>,
|
||||
y: Iterable<Iterable<Number>>,
|
||||
->
|
||||
println("1")
|
||||
}
|
||||
val x11 = {
|
||||
x: Comparable<Comparable<Number>>,
|
||||
y: Iterable<Iterable<Number>>,/**/
|
||||
->
|
||||
println("1")
|
||||
}
|
||||
val x2 = { x: Comparable<Comparable<Number>>,
|
||||
-> println("1")
|
||||
}
|
||||
val x3: ((Int,) -> Int) -> Unit = { x: (Int,) -> Int, -> println("1") }
|
||||
val x4: ((Int,) -> Int) -> Unit = { x, -> println("1") }
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception,) {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception,) {
|
||||
|
||||
} catch (e: Exception,) {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception,) {
|
||||
|
||||
} finally {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception,/**/) {
|
||||
|
||||
} finally {
|
||||
|
||||
}
|
||||
}
|
||||
Vendored
+65
@@ -0,0 +1,65 @@
|
||||
package
|
||||
|
||||
public val foo8: (kotlin.Int, kotlin.Int) -> kotlin.Int
|
||||
public val foo9: (kotlin.Int, kotlin.Int, kotlin.Int) -> kotlin.Int
|
||||
public fun foo4(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Comparable<kotlin.Float>): kotlin.Unit
|
||||
public fun foo5(/*0*/ x: kotlin.Int = ...): kotlin.Unit
|
||||
public fun foo6(/*0*/ vararg x: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit
|
||||
public fun foo61(/*0*/ vararg x: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit
|
||||
public fun foo7(/*0*/ y: kotlin.Float, /*1*/ vararg x: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public open class Foo1 {
|
||||
public constructor Foo1(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.Float = ...)
|
||||
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
|
||||
}
|
||||
|
||||
public open class Foo10 {
|
||||
public constructor Foo10(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.Float = ...)
|
||||
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
|
||||
}
|
||||
|
||||
public final class Foo11 : Foo10 {
|
||||
public constructor Foo11(/*0*/ x: kotlin.Float)
|
||||
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
|
||||
}
|
||||
|
||||
public final class Foo12 : Foo10 {
|
||||
public constructor Foo12(/*0*/ x: kotlin.Float)
|
||||
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
|
||||
}
|
||||
|
||||
public final class Foo2 : Foo1 {
|
||||
public constructor Foo2(/*0*/ x: kotlin.Float, /*1*/ y: kotlin.Int = ...)
|
||||
public constructor Foo2(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.Float)
|
||||
public final val x: kotlin.Int
|
||||
public final var y: kotlin.Float
|
||||
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
|
||||
}
|
||||
|
||||
public final enum class Foo3 : kotlin.Enum<Foo3> {
|
||||
private constructor Foo3(/*0*/ x: kotlin.Int)
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Foo3): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Foo3!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Foo3
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<Foo3>
|
||||
}
|
||||
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_EXPRESSION -NAME_SHADOWING
|
||||
|
||||
fun foo1(x: Any) = when (x) {
|
||||
Comparable::class,
|
||||
Iterable::class,
|
||||
String::class<!UNSUPPORTED_FEATURE!>,<!>
|
||||
-> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
|
||||
fun foo2(x: Any) {
|
||||
val z = when (val y: Int = x as Int) {
|
||||
1<!UNSUPPORTED_FEATURE!>,<!> -> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
}
|
||||
|
||||
fun foo3(x: (Any) -> Any) {
|
||||
val z = when (val y: (Any) -> Any = x) {
|
||||
{x: Any<!UNSUPPORTED_FEATURE!>,<!> -> x}, {y: Any<!UNSUPPORTED_FEATURE!>,<!> -> y}<!UNSUPPORTED_FEATURE!>,<!> -> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
}
|
||||
|
||||
fun foo4(x: Any) {
|
||||
val z = when (x) {
|
||||
is Int, is Double<!UNSUPPORTED_FEATURE!>,<!> -> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
}
|
||||
|
||||
fun foo5(x: Int, y: IntArray, z: IntArray) {
|
||||
val u = when (x) {
|
||||
in y,
|
||||
in z<!UNSUPPORTED_FEATURE!>,<!>
|
||||
-> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
}
|
||||
|
||||
fun foo6(x: Boolean?) = when (x) {
|
||||
true, false<!UNSUPPORTED_FEATURE!>,<!> -> println(1)
|
||||
null<!UNSUPPORTED_FEATURE!>,<!> -> println(1)
|
||||
}
|
||||
|
||||
fun foo7(x: Boolean?) = when (x) {
|
||||
true, false<!UNSUPPORTED_FEATURE!>,<!>/**/ -> println(1)
|
||||
null<!UNSUPPORTED_FEATURE!>,<!>/**/ -> println(1)
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
package
|
||||
|
||||
public fun foo1(/*0*/ x: kotlin.Any): kotlin.Unit
|
||||
public fun foo2(/*0*/ x: kotlin.Any): kotlin.Unit
|
||||
public fun foo3(/*0*/ x: (kotlin.Any) -> kotlin.Any): kotlin.Unit
|
||||
public fun foo4(/*0*/ x: kotlin.Any): kotlin.Unit
|
||||
public fun foo5(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.IntArray, /*2*/ z: kotlin.IntArray): kotlin.Unit
|
||||
public fun foo6(/*0*/ x: kotlin.Boolean?): kotlin.Unit
|
||||
public fun foo7(/*0*/ x: kotlin.Boolean?): kotlin.Unit
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -NAME_SHADOWING
|
||||
// !LANGUAGE: +TrailingCommas
|
||||
|
||||
fun foo1(x: Any) = when (x) {
|
||||
Comparable::class,
|
||||
Iterable::class,
|
||||
String::class,
|
||||
-> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
|
||||
fun foo2(x: Any) {
|
||||
val z = when (val y: Int = x as Int) {
|
||||
1, -> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
}
|
||||
|
||||
fun foo3(x: (Any) -> Any) {
|
||||
val z = when (val y: (Any) -> Any = x) {
|
||||
{x: Any, -> x}, {y: Any, -> y}, -> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
}
|
||||
|
||||
fun foo4(x: Any) {
|
||||
val z = when (x) {
|
||||
is Int, is Double, -> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
}
|
||||
|
||||
fun foo5(x: Int, y: IntArray, z: IntArray) {
|
||||
val u = when (x) {
|
||||
in y,
|
||||
in z,
|
||||
-> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
}
|
||||
|
||||
fun foo6(x: Boolean?) = when (x) {
|
||||
true, false, -> println(1)
|
||||
null, -> println(1)
|
||||
}
|
||||
|
||||
fun foo7(x: Boolean?) = when (x) {
|
||||
true, false,/**/ -> println(1)
|
||||
null,/**/ -> println(1)
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
package
|
||||
|
||||
public fun foo1(/*0*/ x: kotlin.Any): kotlin.Unit
|
||||
public fun foo2(/*0*/ x: kotlin.Any): kotlin.Unit
|
||||
public fun foo3(/*0*/ x: (kotlin.Any) -> kotlin.Any): kotlin.Unit
|
||||
public fun foo4(/*0*/ x: kotlin.Any): kotlin.Unit
|
||||
public fun foo5(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.IntArray, /*2*/ z: kotlin.IntArray): kotlin.Unit
|
||||
public fun foo6(/*0*/ x: kotlin.Boolean?): kotlin.Unit
|
||||
public fun foo7(/*0*/ x: kotlin.Boolean?): kotlin.Unit
|
||||
@@ -25,8 +25,6 @@ KtFile: CollectionLiterals_ERR.kt
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n ')
|
||||
|
||||
+1
-5
@@ -533,8 +533,6 @@ KtFile: ForWithMultiDecl.kt
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Expecting a name
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -593,8 +591,6 @@ KtFile: ForWithMultiDecl.kt
|
||||
PsiErrorElement:Type expected
|
||||
<empty list>
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Expecting a name
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -687,4 +683,4 @@ KtFile: ForWithMultiDecl.kt
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
+3
-11
@@ -80,8 +80,6 @@ KtFile: FunctionLiterals_ERR.kt
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Expecting a name
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -245,10 +243,7 @@ KtFile: FunctionLiterals_ERR.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_PARAMETER
|
||||
PsiErrorElement:Expecting parameter name
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
@@ -306,10 +301,7 @@ KtFile: FunctionLiterals_ERR.kt
|
||||
VALUE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_PARAMETER
|
||||
PsiErrorElement:Expecting parameter name
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
@@ -827,4 +819,4 @@ KtFile: FunctionLiterals_ERR.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
+2
@@ -20,3 +20,5 @@ typealias f = T<A, B>.T<x>.() -> Unit
|
||||
typealias f = @[a] T.() -> Unit
|
||||
typealias f = @[a] T.T.() -> Unit
|
||||
typealias f = @[a] T<A, B>.T<x>.() -> Unit
|
||||
|
||||
typealias f = (a, ) -> b
|
||||
|
||||
+28
-1
@@ -680,4 +680,31 @@ KtFile: FunctionTypes.kt
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiWhiteSpace('\n\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
-1
@@ -1 +0,0 @@
|
||||
typealias f = (a, ) -> b
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
KtFile: FunctionTypes_ERR.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_PARAMETER
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Expecting a parameter declaration
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
+1
-5
@@ -298,8 +298,6 @@ KtFile: MultiVariableDeclarations.kt
|
||||
DESTRUCTURING_DECLARATION_ENTRY
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Expecting a name
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -350,8 +348,6 @@ KtFile: MultiVariableDeclarations.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Expecting a name
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -616,4 +612,4 @@ KtFile: MultiVariableDeclarations.kt
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
-2
@@ -139,8 +139,6 @@ KtFile: TypeAlias_ERR.kt
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Type parameter declaration expected
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
@@ -95,11 +95,9 @@ KtFile: MapEntry.kt
|
||||
PsiErrorElement:Unexpected token
|
||||
PsiElement(EXCL)('!')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Expecting a parameter declaration
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
class A(
|
||||
val x: String,
|
||||
val y: String,
|
||||
) {
|
||||
constructor(
|
||||
x: Comparable<Comparable<Number>>,
|
||||
y: Iterable<Iterable<Number>> ,
|
||||
) {}
|
||||
|
||||
var x: Int
|
||||
get() = 10
|
||||
set(value,) {
|
||||
|
||||
}
|
||||
|
||||
var x: Int
|
||||
get() = 10
|
||||
set(value,/*...*/) {
|
||||
|
||||
}
|
||||
|
||||
var x: Int
|
||||
get() = 10
|
||||
set(value/*...*/,) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(
|
||||
x: Int,
|
||||
y: Number
|
||||
,
|
||||
) {}
|
||||
|
||||
val foo: (Int, Int) -> Int = fun(x,
|
||||
y, ): Int {
|
||||
return x + y
|
||||
}
|
||||
|
||||
val foo: (Int, Int, Int) -> Int =
|
||||
fun (x,
|
||||
y: Int, z,
|
||||
): Int {
|
||||
return x + y
|
||||
}
|
||||
|
||||
fun foo() = listOf(
|
||||
foo.bar.something(),
|
||||
"foo bar something"
|
||||
,
|
||||
)
|
||||
|
||||
fun foo() {
|
||||
val x = x[
|
||||
1,
|
||||
3
|
||||
, ]
|
||||
val y = x[
|
||||
1,
|
||||
3
|
||||
,
|
||||
]
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val x = {
|
||||
x: Comparable<Comparable<Number>>,
|
||||
y: Iterable<Iterable<Number>>
|
||||
,->
|
||||
println("1")
|
||||
}
|
||||
val y = {
|
||||
x: Comparable<Comparable<Number>>,
|
||||
y: Iterable<Iterable<Number>>,
|
||||
-> println("1")
|
||||
}
|
||||
val z = {
|
||||
x: Comparable<Comparable<Number>>,
|
||||
y: Iterable<Iterable<Number>>
|
||||
,
|
||||
->
|
||||
println("1")
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(x: Any) = when (x) {
|
||||
Comparable::class,
|
||||
Iterable::class,
|
||||
String::class,
|
||||
-> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
|
||||
fun foo(x: Any) = when (x) {
|
||||
Comparable::class,
|
||||
Iterable::class,
|
||||
String::class,->
|
||||
println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
|
||||
fun foo(x: Any) = when (x) {
|
||||
Comparable::class,
|
||||
Iterable::class,
|
||||
String::class
|
||||
,
|
||||
->
|
||||
println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
|
||||
@Anno([1, 2, 3, 4
|
||||
,]
|
||||
)
|
||||
fun foo() {}
|
||||
|
||||
fun main() {
|
||||
val (
|
||||
y,
|
||||
z,
|
||||
) = Pair(1, 2)
|
||||
val (
|
||||
y,
|
||||
z
|
||||
, ) = Pair(1, 2)
|
||||
}
|
||||
|
||||
class A<
|
||||
T1: Number,
|
||||
T2: Iterable<Iterable<Iterable<Number>>>,
|
||||
T3: Comparable<Comparable<Comparable<Number>>>,
|
||||
> { }
|
||||
|
||||
fun <
|
||||
T1: Comparable<Comparable<Number>>,
|
||||
T2: Iterable<Iterable<Number>>
|
||||
,
|
||||
> foo() {}
|
||||
|
||||
fun main() {
|
||||
foo<Comparable<Comparable<Number>>, Iterable<Iterable<Number>>,>()
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val x: (
|
||||
y: Comparable<Comparable<Number>>,
|
||||
z: Iterable<Iterable<Number>>,
|
||||
) -> Int = { 10 }
|
||||
|
||||
val y = foo(1,) {}
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception,) {
|
||||
|
||||
}
|
||||
}
|
||||
+1537
File diff suppressed because it is too large
Load Diff
+109
@@ -0,0 +1,109 @@
|
||||
class A: A1, A2, { }
|
||||
|
||||
class A<T1, T2> where
|
||||
T1: Comparable<Comparable<Number>>,
|
||||
T2: Iterable<Iterable<Number>>, { }
|
||||
|
||||
class A(
|
||||
val x: String,
|
||||
val y: String,,
|
||||
) {
|
||||
constructor(,) {}
|
||||
}
|
||||
|
||||
fun foo(
|
||||
x: Int,
|
||||
y: Number
|
||||
,
|
||||
,
|
||||
) {}
|
||||
|
||||
fun foo() = listOf(
|
||||
foo.bar.something(),
|
||||
"foo bar something",
|
||||
,
|
||||
)
|
||||
|
||||
fun foo() = listOf(
|
||||
foo.bar.something(),
|
||||
,"foo bar something")
|
||||
|
||||
fun foo() = listOf(
|
||||
foo.bar.something(),
|
||||
,"foo bar something",
|
||||
)
|
||||
|
||||
fun foo() {
|
||||
val x = x[
|
||||
1,
|
||||
3,
|
||||
,]
|
||||
val y = x[,]
|
||||
val z1 = x[,1]
|
||||
val z2 = x[,,1]
|
||||
val z3 = x[,1,]
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val x = { x: Comparable<Comparable<Number>>,
|
||||
y: Iterable<Iterable<Number>>,
|
||||
, ->
|
||||
println("1")
|
||||
}
|
||||
val y = { , ->
|
||||
println("1")
|
||||
}
|
||||
val () = Pair(1,2)
|
||||
val (,) = Pair(1,2)
|
||||
}
|
||||
|
||||
fun foo(x: Any) = when (x) {
|
||||
Comparable::class,
|
||||
Iterable::class,
|
||||
String::class,
|
||||
,
|
||||
-> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
|
||||
fun foo(x: Any) = when (x) {
|
||||
,Comparable::class,
|
||||
-> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
|
||||
fun foo(x: Any) = when (x) {
|
||||
,Comparable::class -> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
|
||||
fun foo(x: Any) = when (x) {
|
||||
, -> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
|
||||
fun foo(x: Any) = when (x) {
|
||||
true -> println(1)
|
||||
else, -> println(3)
|
||||
}
|
||||
|
||||
fun foo(x: Any) = when (x) {
|
||||
true, ,-> println(1)
|
||||
else -> println(3)
|
||||
}
|
||||
|
||||
fun foo() = foo(,) {}
|
||||
|
||||
fun foo() = foo {},
|
||||
|
||||
fun foo() = foo(1) {},
|
||||
|
||||
fun <T, : Number> foo10() {
|
||||
fun <T1,T2,T3,:Comparable<Int>> foo10() {}
|
||||
}
|
||||
|
||||
fun foo() = when (x) {
|
||||
1,, -> null
|
||||
}
|
||||
|
||||
fun <T1,T2,,>foo() {}
|
||||
+1289
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user