[FIR] Change some raw-fir test files to make them correct
"correct" means that these files can be compiled. This change is necessary for visualizer. Don't want to ignore these test files, so they must not produce errors.
This commit is contained in:
committed by
TeamCityServer
parent
951d607445
commit
3e66d12bef
+9
-1
@@ -1,4 +1,12 @@
|
||||
@Target(AnnotationTarget.ANNOTATION_CLASS) annotation class base
|
||||
@Target(
|
||||
AnnotationTarget.CLASS,
|
||||
AnnotationTarget.PROPERTY,
|
||||
AnnotationTarget.LOCAL_VARIABLE,
|
||||
AnnotationTarget.VALUE_PARAMETER,
|
||||
AnnotationTarget.CONSTRUCTOR,
|
||||
AnnotationTarget.FUNCTION,
|
||||
AnnotationTarget.TYPE
|
||||
) annotation class base
|
||||
|
||||
@base annotation class derived
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: annotation.kt
|
||||
@Target(AnnotationTarget#.ANNOTATION_CLASS#) public? final? annotation class base : R|kotlin/Annotation| {
|
||||
@Target(AnnotationTarget#.CLASS#, AnnotationTarget#.PROPERTY#, AnnotationTarget#.LOCAL_VARIABLE#, AnnotationTarget#.VALUE_PARAMETER#, AnnotationTarget#.CONSTRUCTOR#, AnnotationTarget#.FUNCTION#, AnnotationTarget#.TYPE#) public? final? annotation class base : R|kotlin/Annotation| {
|
||||
public? constructor(): R|base| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: annotation.kt
|
||||
@Target(AnnotationTarget#.ANNOTATION_CLASS#) public? final? annotation class base : R|kotlin/Annotation| {
|
||||
@Target(AnnotationTarget#.CLASS#, AnnotationTarget#.PROPERTY#, AnnotationTarget#.LOCAL_VARIABLE#, AnnotationTarget#.VALUE_PARAMETER#, AnnotationTarget#.CONSTRUCTOR#, AnnotationTarget#.FUNCTION#, AnnotationTarget#.TYPE#) public? final? annotation class base : R|kotlin/Annotation| {
|
||||
public? constructor(): R|base| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
fun <T> simpleRun(f: (T) -> Unit): Unit = f()
|
||||
fun <T> simpleRun(f: () -> T): T = f()
|
||||
|
||||
fun <T, R> List<T>.simpleMap(f: (T) -> R): R {
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FILE: functionTypes.kt
|
||||
public? final? fun <T> simpleRun(f: ( (T) -> Unit )): Unit { LAZY_BLOCK }
|
||||
public? final? fun <T> simpleRun(f: ( () -> T )): T { LAZY_BLOCK }
|
||||
public? final? fun <T, R> List<T>.simpleMap(f: ( (T) -> R )): R { LAZY_BLOCK }
|
||||
public? final? fun <T> simpleWith(t: T, f: ( T.() -> Unit )): Unit { LAZY_BLOCK }
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: functionTypes.kt
|
||||
public? final? fun <T> simpleRun(f: ( (T) -> Unit )): Unit {
|
||||
public? final? fun <T> simpleRun(f: ( () -> T )): T {
|
||||
^simpleRun f#()
|
||||
}
|
||||
public? final? fun <T, R> List<T>.simpleMap(f: ( (T) -> R )): R {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
@Target(AnnotationTarget.EXPRESSION, AnnotationTarget.LOCAL_VARIABLE)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class Ann
|
||||
|
||||
@@ -12,7 +12,7 @@ fun foo(arg: Int): Int {
|
||||
return 42
|
||||
}
|
||||
|
||||
data class Two(x: Int, y: Int)
|
||||
data class Two(val x: Int, val y: Int)
|
||||
|
||||
fun bar(two: Two) {
|
||||
val (@Ann x, @Ann y) = two
|
||||
|
||||
+12
-2
@@ -1,5 +1,5 @@
|
||||
FILE: annotated.kt
|
||||
@Target(AnnotationTarget#.EXPRESSION#) @Retention(AnnotationRetention#.SOURCE#) public? final? annotation class Ann : R|kotlin/Annotation| {
|
||||
@Target(AnnotationTarget#.EXPRESSION#, AnnotationTarget#.LOCAL_VARIABLE#) @Retention(AnnotationRetention#.SOURCE#) public? final? annotation class Ann : R|kotlin/Annotation| {
|
||||
public? constructor(): R|Ann| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
@@ -11,7 +11,17 @@ FILE: annotated.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun copy(): R|Two|
|
||||
public? final? val x: Int = R|<local>/x|
|
||||
public? get(): Int
|
||||
|
||||
public? final? val y: Int = R|<local>/y|
|
||||
public? get(): Int
|
||||
|
||||
public final operator fun component1(): Int
|
||||
|
||||
public final operator fun component2(): Int
|
||||
|
||||
public final fun copy(x: Int = this@R|/Two|.R|/Two.x|, y: Int = this@R|/Two|.R|/Two.y|): R|Two|
|
||||
|
||||
}
|
||||
public? final? fun bar(two: Two): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
+12
-2
@@ -1,5 +1,5 @@
|
||||
FILE: annotated.kt
|
||||
@Target(AnnotationTarget#.EXPRESSION#) @Retention(AnnotationRetention#.SOURCE#) public? final? annotation class Ann : R|kotlin/Annotation| {
|
||||
@Target(AnnotationTarget#.EXPRESSION#, AnnotationTarget#.LOCAL_VARIABLE#) @Retention(AnnotationRetention#.SOURCE#) public? final? annotation class Ann : R|kotlin/Annotation| {
|
||||
public? constructor(): R|Ann| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
@@ -25,7 +25,17 @@ FILE: annotated.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun copy(): R|Two|
|
||||
public? final? val x: Int = R|<local>/x|
|
||||
public? get(): Int
|
||||
|
||||
public? final? val y: Int = R|<local>/y|
|
||||
public? get(): Int
|
||||
|
||||
public final operator fun component1(): Int
|
||||
|
||||
public final operator fun component2(): Int
|
||||
|
||||
public final fun copy(x: Int = this@R|/Two|.R|/Two.x|, y: Int = this@R|/Two|.R|/Two.y|): R|Two|
|
||||
|
||||
}
|
||||
public? final? fun bar(two: Two): R|kotlin/Unit| {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
infix fun distance(x: Int, y: Int) = x + y
|
||||
infix fun Int.distance(y: Int) = this + y
|
||||
|
||||
fun test(): Int = 3 distance 4
|
||||
|
||||
fun testRegular(): Int = distance(3, 4)
|
||||
fun testRegular(): Int = 3.distance(4)
|
||||
|
||||
class My(var x: Int) {
|
||||
operator fun invoke() = x
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: calls.kt
|
||||
public? final? infix fun distance(x: Int, y: Int): <implicit> { LAZY_BLOCK }
|
||||
public? final? infix fun Int.distance(y: Int): <implicit> { LAZY_BLOCK }
|
||||
public? final? fun test(): Int { LAZY_BLOCK }
|
||||
public? final? fun testRegular(): Int { LAZY_BLOCK }
|
||||
public? final? class My : R|kotlin/Any| {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
FILE: calls.kt
|
||||
public? final? infix fun distance(x: Int, y: Int): <implicit> {
|
||||
^distance x#.plus#(y#)
|
||||
public? final? infix fun Int.distance(y: Int): <implicit> {
|
||||
^distance this#.plus#(y#)
|
||||
}
|
||||
public? final? fun test(): Int {
|
||||
^test IntegerLiteral(3).distance#(IntegerLiteral(4))
|
||||
}
|
||||
public? final? fun testRegular(): Int {
|
||||
^testRegular distance#(IntegerLiteral(3), IntegerLiteral(4))
|
||||
^testRegular IntegerLiteral(3).distance#(IntegerLiteral(4))
|
||||
}
|
||||
public? final? class My : R|kotlin/Any| {
|
||||
public? constructor(x: Int): R|My| {
|
||||
|
||||
@@ -6,7 +6,7 @@ fun withLocals(p: Int): Int {
|
||||
val x = Local(42).diff()
|
||||
|
||||
fun sum(y: Int, z: Int, f: (Int, Int) -> Int): Int {
|
||||
return x + f(y + z)
|
||||
return x + f(y, z)
|
||||
}
|
||||
|
||||
val code = (object : Any() {
|
||||
|
||||
@@ -16,7 +16,7 @@ FILE: locals.kt
|
||||
|
||||
lval x: <implicit> = Local#(IntegerLiteral(42)).diff#()
|
||||
local final? fun sum(y: Int, z: Int, f: ( (Int, Int) -> Int )): Int {
|
||||
^sum x#.plus#(f#(y#.plus#(z#)))
|
||||
^sum x#.plus#(f#(y#, z#))
|
||||
}
|
||||
|
||||
lval code: <implicit> = object : Any {
|
||||
|
||||
Reference in New Issue
Block a user