Files
kotlin-fork/compiler/fir/resolve/testData/resolveWithStdlib/j+k/MyIterable.txt
T
Denis Zharkov 2ad8488e6a FIR: Rewrite Java type mapping
Previoisly, there were two places where mapping had happened:
- toConeKotlinTypeWithNullability
- enhancePossiblyFlexible

The first one was used for supertypes and bounds and the second one
was used for other signature parts

The main idea is to perform type mapping once to a flexible type,
and then use it as it's needed (it's lower bound, or for the further ehnancement)

Also, this commit fixes flexibility for type arguments, see the tests
2020-02-19 15:53:34 +03:00

13 lines
1.1 KiB
Plaintext
Vendored

FILE: test.kt
public abstract interface UseIterable : R|MyIterable<kotlin/String>| {
public open fun test(): R|kotlin/Unit| {
lval it: R|kotlin/collections/MutableIterator<ft<kotlin/String, kotlin/String?>!>| = this@R|/UseIterable|.R|FakeOverride<kotlin/collections/MutableIterable.iterator: R|kotlin/collections/MutableIterator<ft<kotlin/String, kotlin/String?>!>|>|()
lval split: R|java/util/Spliterator<ft<kotlin/String, kotlin/String?>!>| = this@R|/UseIterable|.R|FakeOverride<java/lang/Iterable.spliterator: R|java/util/Spliterator<ft<kotlin/String, kotlin/String?>!>|>|()
}
}
public final fun test(some: R|kotlin/collections/Iterable<kotlin/String>|): R|kotlin/Unit| {
lval it: R|kotlin/collections/Iterator<kotlin/String>| = R|<local>/some|.R|FakeOverride<kotlin/collections/Iterable.iterator: R|kotlin/collections/Iterator<kotlin/String>|>|()
lval split: R|java/util/Spliterator<ft<kotlin/String, kotlin/String?>!>| = R|<local>/some|.R|FakeOverride<java/lang/Iterable.spliterator: R|java/util/Spliterator<ft<kotlin/String, kotlin/String?>!>|>|()
}