More cases supported for inline functions: namespace level functions with parameters (not blocks)

This commit is contained in:
Pavel V. Talanov
2012-03-28 16:38:59 +04:00
parent 8843bac989
commit 9b2dc6f584
12 changed files with 275 additions and 51 deletions
@@ -0,0 +1,13 @@
package foo
fun box() : Boolean {
if (myInlineFun(3, 2) != 1) {
return false;
}
if (myInlineFun(100, -100) != 200) {
return false;
}
return true;
}
inline fun myInlineFun(l : Int, r : Int) = l - r