79303ab2db
Anonymous functions (lambdas) are not allowed as annotation arguments. However, because it is still possible to parse code written this way, it must be handled without exception. So ignore these expressions when processing annotation arguments. #KT-59565 Fixed
19 lines
394 B
Kotlin
Vendored
19 lines
394 B
Kotlin
Vendored
// ISSUE: KT-59565
|
|
|
|
@Target(AnnotationTarget.TYPE)
|
|
annotation class Ann(val x: Int)
|
|
|
|
class A<T: @Ann(<!ANNOTATION_ARGUMENT_MUST_BE_CONST, TYPE_MISMATCH!>{
|
|
fun local() = 1
|
|
var result = local()
|
|
result += 1
|
|
result
|
|
}<!>) Any>
|
|
|
|
fun f(x: @Ann(<!ANNOTATION_ARGUMENT_MUST_BE_CONST, TYPE_MISMATCH!>{
|
|
fun local() = 1
|
|
var result = local()
|
|
result += 1
|
|
result
|
|
}<!>) Int) = x
|