Add support for script base class with parameters

including possibility to describe which script params to pass to superclass
This commit is contained in:
Ilya Chernikov
2016-05-31 17:05:45 +02:00
parent 3c1503564e
commit e1ca45f360
8 changed files with 94 additions and 27 deletions
@@ -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)