0c1d25d5ac
Decide on completion order by other factors
Previously would prefer callable that return Unit if Unit is the expected type
leading to strange completion order
#KT-25588 Fixed
32 lines
497 B
Kotlin
Vendored
32 lines
497 B
Kotlin
Vendored
// RUNTIME_WITH_SCRIPT_RUNTIME
|
|
|
|
@DslMarker
|
|
annotation class MyDsl
|
|
|
|
project1 {
|
|
<caret>
|
|
}
|
|
|
|
|
|
@MyDsl
|
|
fun project1(p: Project.() -> Unit): Project {
|
|
Project(p)
|
|
}
|
|
|
|
@MyDsl
|
|
fun project2(p: Project.() -> Unit) {
|
|
Project(p)
|
|
}
|
|
|
|
@MyDsl
|
|
class Project(init: Project.() -> Unit) {
|
|
@MyDsl
|
|
fun buildType(init: BuildType.() -> Unit): BuildType {
|
|
return BuildType(this, init)
|
|
}
|
|
}
|
|
|
|
@MyDsl
|
|
class BuildType(p: Project, init: BuildType.() -> Unit)
|
|
|
|
// ORDER: buildType, project1, project2 |