KT-2270 VerifyError when default value of constructor parameter is previous parameter

#KT-2270 Fixed
This commit is contained in:
Alexander Udalov
2012-08-03 22:55:29 +04:00
parent 7f456ede1a
commit 04b2477784
5 changed files with 45 additions and 14 deletions
@@ -0,0 +1,5 @@
class A(val expected: Int) {
fun foo(x: Int, y: Int = x + 20, z: Int = y * 2) = z == expected
}
fun box() = if (A(42).foo(1)) "OK" else "Fail"