Files
kotlin/compiler/testData/codegen/box/reified
Stanislav Erokhin 4932fa1ddd Support expected type from explicit cast
This commit support the following case.
Suppose we have such declaration:
  fun <T> foo(): T { ... }

Then in code we want to use it like this: `foo() as String`.
But in LV <= 1.1 we have type inference error: "Not enough
information for type parameter `T`". This error happened because we
do not use type from cast as expected type for call.

In this commit we fix this problem and use this type as expected type
in following cases:
 - our function has only one type parameter (this can be relaxed later)
 - function parameter types and extension receiver type not contains `T`

Also this fix problem with `findViewById`.
Already signature was: `fun findViewById(...): View`
and was used like: `findViewById() as MyView`.
New signature is `fun <T : View> findViewById(...): T`
and old usage was broken because of problem described above
2017-10-11 19:23:52 +03:00
..
2016-11-16 19:50:10 +03:00
2016-11-16 19:50:10 +03:00
2016-11-09 21:41:12 +03:00
2016-11-09 21:41:12 +03:00
2016-11-16 19:50:10 +03:00
2016-11-16 19:50:10 +03:00
2016-11-16 19:50:10 +03:00