Proper param propagation in inline

This commit is contained in:
Michael Bogdanov
2015-09-30 14:23:38 +03:00
parent 79fce388b3
commit c83a5b8bd5
18 changed files with 409 additions and 193 deletions
@@ -0,0 +1,19 @@
import test.*
fun box(): String {
var res = "";
var call = test(b = {res += "K"; "K"}(), a = {res+="O"; "O"}(), c = {res += "L"; "L"})
if (res != "KOL" || call != "OKL") return "fail 1: $res != KOL or $call != OKL"
res = "";
call = test(b = {res += "K"; "K"}(), c = {res += "L"; "L"}, a = {res+="O"; "O"}())
if (res != "KOL" || call != "OKL") return "fail 2: $res != KOL or $call != OKL"
res = "";
call = test(c = {res += "L"; "L"}, b = {res += "K"; "K"}(), a = {res+="O"; "O"}())
if (res != "KOL" || call != "OKL") return "fail 3: $res != KOL or $call != OKL"
return "OK"
}