Calls to functions that have a single-line expression or statement should be inlined.
func isArrayIndex(index : int) : bool -> index >= 0 && index < length
A call to this function
const i = 10
var isValid = isArrayIndex(i)
Would be compiled to
const i = 10
var isValid = i >= 0 && i < length
An example function that uses a single-line statement
func print(msg : String?) -> System.out.println("Log: " + msg)
The function call print("Hello!") would be inlined to System.out.println("Log: Hello!")
Calls to functions that have a single-line expression or statement should be inlined.
A call to this function
Would be compiled to
An example function that uses a single-line statement
The function call
print("Hello!")would be inlined toSystem.out.println("Log: Hello!")