[NI] Use ErrorType in ParseErrorKotlinCallArgument
Previously, there was receiver of type Nothing, which could case result
of the call to be inferred to Nothing too. This could case bogus
UNREACHABLE_CODE diagnostics in cases like this:
```
fun <T> id(x: T) = x
fun test() {
id(unresolvedReference) // type of statement is 'Nothing'
// ... everything here is marked as unreachable ...
}
```
This commit changes type of receiver for such calls form Nothing to
ErrorType.
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ fun test3(z: Z) {
|
||||
//'in' operation
|
||||
fun test4(collection: Collection<A<*>>) {
|
||||
id(<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>newA<!>() in collection)
|
||||
<!NI;UNREACHABLE_CODE!>id(newA<Int>() in collection)<!>
|
||||
id(newA<Int>() in collection)
|
||||
}
|
||||
|
||||
//boolean operations
|
||||
|
||||
Reference in New Issue
Block a user