Nikky
09/05/2020, 9:50 AMdefaultImports.append("voodoo.dsl.*")
that show allow the script to use all extension functions declared in that package correct ?
i am facing some weird issues while trying to work on the DSL accessible from the scripts
errors like 'fun <E : NestedEntry> NestedEntry.Curse.list(initList: ListBuilder<NestedEntry.Curse>.() -> Unit): NestedEntry.Curse' can't be called in this context by implicit receiver. Use the explicit one if necessary
function looks like
fun <E: NestedEntry> E.list(
initList: ListBuilder<E>.() -> Unit
): E {
val listBuilder = ListBuilder(this)
listBuilder.initList()
// add all entries from list
entries += listBuilder.listEntries
return this
}
and i am not sure why it cannot be called on a receiver.. maybe the DSL markers mess it up..
but i call it directly on the object
and it also compiles in other parts of the code that are not compiled by scriptilya.chernikov
09/10/2020, 10:24 AM