Add support for script base class with parameters
including possibility to describe which script params to pass to superclass
This commit is contained in:
@@ -26,3 +26,6 @@ interface TestDSLInterface
|
||||
|
||||
fun TestDSLInterface.fibCombine(f: (Int) -> Int, n: Int) = if (n < 2) 1 else f(n - 1) + f(n - 2)
|
||||
|
||||
open class TestDSLClassWithParam(val offset: Int)
|
||||
|
||||
fun TestDSLClassWithParam.fibCombine(f: (Int) -> Int, n: Int) = if (n < 2) offset else f(n - 1) + f(n - 2)
|
||||
|
||||
Reference in New Issue
Block a user