Mark only unreachable parts of element if it has reachable parts
like for 'return todo()' mark only 'return'
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// !DIAGNOSTICS: -UNREACHABLE_CODE
|
||||
//KT-2445 Calling method with function with generic parameter causes compile-time exception
|
||||
package a
|
||||
|
||||
@@ -7,4 +8,4 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
|
||||
fun test<R>(callback: (R) -> Unit):Unit = <!UNREACHABLE_CODE!>callback<!>(null!!)
|
||||
fun test<R>(callback: (R) -> Unit):Unit = callback(null!!)
|
||||
@@ -1,3 +1,4 @@
|
||||
// !DIAGNOSTICS: -UNREACHABLE_CODE
|
||||
//KT-2838 Type inference failed on passing null as a nullable argument
|
||||
package a
|
||||
|
||||
@@ -9,9 +10,9 @@ fun test(a: Int) {
|
||||
bar(a, <!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
}
|
||||
fun test1(a: Int) {
|
||||
<!UNREACHABLE_CODE!>foo<!>(a, throw Exception())
|
||||
foo(a, throw Exception())
|
||||
}
|
||||
|
||||
fun test2(a: Int) {
|
||||
<!UNREACHABLE_CODE!>bar<!>(a, throw Exception())
|
||||
bar(a, throw Exception())
|
||||
}
|
||||
Reference in New Issue
Block a user