Mark array constructors with 'inline'

To allow non-local returns from lambdas passed to them
This commit is contained in:
Alexander Udalov
2016-01-27 19:52:39 +03:00
parent 70e847b794
commit a02d1b75b8
9 changed files with 62 additions and 31 deletions
@@ -37,7 +37,7 @@ class GenerateArrays(out: PrintWriter) : BuiltInsSourceGenerator(out) {
out.println(" * Creates a new array of the specified [size], where each element is calculated by calling the specified")
out.println(" * [init] function. The [init] function returns an array element given its index.")
out.println(" */")
out.println(" public constructor(size: Int, init: (Int) -> $s)")
out.println(" public inline constructor(size: Int, init: (Int) -> $s)")
out.println()
out.println(" /** Returns the array element at the given [index]. This method can be called using the index operator. */")
out.println(" public operator fun get(index: Int): $s")