Files
kotlin-fork/idea/testData/checker/infos/CapturedConstructorParameter.kt
T
Denis Zharkov fc447e2d2f Parse some builtin annotations as modifiers
But still resolve them as annotations.
Mostly it's needed as begin of migration path, one day they become modifiers anyway

Some tests are dropped because they supposed that `annotation` should have parameter
2015-09-08 08:53:35 +03:00

53 lines
1.3 KiB
Kotlin
Vendored

interface T
class T1(<warning>t</warning>: Int): T
<info descr="null">inline</info> fun <T> run(f: () -> T) = f()
class Delegate(<warning>d</warning>: Int) {
fun get(k: Any, m: PropertyMetadata) {}
}
class A(y: Int, t: Int, d: Int): T <info>by</info> T1(t) {
val <info>a</info> = y
val b <info>by</info> Delegate(d)
}
class A2<T>(x: Int, y: Int, t: T) {
val <info>t1</info>: T = t
val <info>x1</info> = run { x }
<info>init</info> {
run {
y
}
}
}
//captured
class B(
<info descr="Value captured in a closure">x</info>: Int,
<info descr="Value captured in a closure">y</info>: Int,
<info descr="Value captured in a closure">t</info>: Int,
<info descr="Value captured in a closure">d</info>: Int
) {
<info>init</info> {
class C(<warning>a</warning>: Int = <info>x</info>): T <info>by</info> T1(<info>t</info>) {
val <info>a</info> = <info>y</info>
val b <info>by</info> Delegate(<info>d</info>)
}
}
}
class B2(<info descr="Value captured in a closure">x</info>: Int, <info descr="Value captured in a closure">y</info>: Int) {
val <info>x1</info> = { <info>x</info> }()
<info>init</info> {
{
<info>y</info>
}()
}
}