Resolution diagnostic improvement

#KT-1940 fixed
This commit is contained in:
Svetlana Isakova
2012-05-10 19:01:37 +04:00
parent e303c80868
commit 8d26629aff
5 changed files with 42 additions and 7 deletions
@@ -0,0 +1,8 @@
package a
fun foo(<!UNUSED_PARAMETER!>i<!>: Int, <!UNUSED_PARAMETER!>s<!>: String) {
}
fun test() {
foo(<!TYPE_MISMATCH!>""<!>, <!ERROR_COMPILE_TIME_VALUE!>1<!>, <!TOO_MANY_ARGUMENTS, UNRESOLVED_REFERENCE!>xx<!>)
}
@@ -0,0 +1,9 @@
//KT-1940 Exception while repeating named parameters
package kt1940
fun foo(<!UNUSED_PARAMETER!>i<!>: Int) {}
fun test() {
foo(1, <!ARGUMENT_PASSED_TWICE, MIXING_NAMED_AND_POSITIONED_ARGUMENTS!>i<!> = 2) //exception
foo(i = 1, <!ARGUMENT_PASSED_TWICE!>i<!> = 2) //exception
}