Improved error reporting, when we trying import invisible descriptor.

This commit is contained in:
Stanislav Erokhin
2015-09-21 17:35:42 +03:00
parent d7a14075f1
commit 85895bec62
4 changed files with 129 additions and 35 deletions
@@ -0,0 +1,44 @@
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
// FILE: 1.kt
package k
private fun zero() {}
private fun zero(a: Int) {}
private fun zero(a: String) {}
fun one() {}
private fun one(a: Int) {}
private fun one(a: String) {}
fun two() {}
fun two(a: Int) {}
private fun two(a: String) {}
fun all() {}
fun all(a: Int) {}
fun all(a: String) {}
// FILE: 2.kt
import k.<!INVISIBLE_REFERENCE, DEBUG_INFO_MISSING_UNRESOLVED!>zero<!>
import k.one
import k.two
import k.all
fun test() {
<!INVISIBLE_MEMBER!>zero<!>()
<!NONE_APPLICABLE!>zero<!>(1)
<!NONE_APPLICABLE!>zero<!>("")
one()
one(<!TOO_MANY_ARGUMENTS!>1<!>)
one(<!TOO_MANY_ARGUMENTS!>""<!>)
two()
two(1)
two(<!TYPE_MISMATCH!>""<!>)
all()
all(1)
all("")
}