标签: kotlin kotlin-dsl
我有以下两种DSL结构:
val dsl = myDsl { val myVar = varCreator { } } val dsl2 = myDsl { //Here I'd like to reference the 'myVar' from my 'dsl' val referencedVar = dsl.myVar }
是否可以从myVar内访问我的dsl2?
myVar
dsl2