[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:
Dmitry Savvinov
2017-11-22 21:43:23 +03:00
parent eadd1355c2
commit 70a1beeff6
2 changed files with 7 additions and 2 deletions
@@ -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