Type checking for default values

This commit is contained in:
Andrey Breslav
2011-09-29 21:34:39 +04:00
parent 5c8b060a49
commit f36438dee2
10 changed files with 51 additions and 9 deletions
@@ -0,0 +1,5 @@
val x = ""
fun bar(x : Int = <!TYPE_MISMATCH!>""<!>, y : Int = <!TYPE_MISMATCH!>x<!>, z : String = <!UNRESOLVED_REFERENCE!>y<!>) {
}
@@ -1,7 +1,7 @@
fun foo(a : Int = 1, b : String = "abc") {
}
fun bar(x : Int = "", y : Int = 1, z : String) {
fun bar(x : Int = 1, y : Int = 1, z : String) {
}
fun test() {