Implicit callable type check refactoring, additional check for property with explicit Nothing type

This commit is contained in:
Mikhail Glukhikh
2015-12-22 20:25:26 +03:00
parent 6b8b39a7bd
commit 15746cbf56
6 changed files with 31 additions and 15 deletions
+11
View File
@@ -5,3 +5,14 @@ fun <!IMPLICIT_NOTHING_RETURN_TYPE!>bar<!>() = null!!
fun <!IMPLICIT_NOTHING_RETURN_TYPE!>baz<!>() = bar()
fun gav(): Any = null!!
val <!IMPLICIT_NOTHING_PROPERTY_TYPE!>x<!> = null!!
val y: Nothing = throw Exception()
fun check() {
// Error: KT-10449
fun local() = bar()
// Unreachable / unused, but not implicit Nothing
<!UNREACHABLE_CODE!>val <!UNUSED_VARIABLE!>x<!> =<!> null!!
}