183c263c55
In this example, when processing
the `jso` property candidate form
the `dynamic` scope we get
`DslScopeViolation`.
When we later create the
receiver for the invoke call
(since we still call `jso {}` as
a function), we create a non-error
named reference which fails at
`toResolvedReference()`.
The included test should not fail
with exception.
^KT-65255 Fixed
22 lines
488 B
Kotlin
Vendored
22 lines
488 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// ISSUE: KT-65255
|
|
// DIAGNOSTICS: -NOTHING_TO_INLINE -UNUSED_ANONYMOUS_PARAMETER
|
|
|
|
@DslMarker
|
|
@Target(AnnotationTarget.CLASS, AnnotationTarget.TYPE)
|
|
@Retention(AnnotationRetention.BINARY)
|
|
annotation class JsoDsl
|
|
|
|
inline fun <T : Any> jso(): T = js("({})")
|
|
inline fun <T : Any> jso(block: @JsoDsl T.() -> Unit): T = jso<T>().apply(block)
|
|
|
|
val value = { int: Int? ->
|
|
jso<dynamic> {
|
|
foo = jso {
|
|
bar = jso { // line 7
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|