[FIR] Properly handle flexible types during creation of DNNT
^KT-50788 Fixed
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
FILE: main.kt
|
||||
public final fun <T : R|kotlin/CharSequence?|> foo(mapper: R|Mapper|, cls: R|java/lang/Class<T>?|): R|kotlin/Unit| {
|
||||
lval result: R|T & Any| = R|<local>/mapper|.R|/Mapper.readValue|<R|ft<T, T?>|>(R|<local>/cls|)!!
|
||||
R|<local>/result|.R|kotlin/CharSequence.length|
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// ISSUE: KT-50788
|
||||
// FILE: Mapper.java
|
||||
public class Mapper {
|
||||
public <T> T readValue(Class<T> valueType) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun <T : CharSequence?> foo(mapper: Mapper, cls: Class<T>?) {
|
||||
val result = <!DEBUG_INFO_EXPRESSION_TYPE("T!!")!>mapper.readValue<T>(cls)!!<!> // The type of result is expected to be T & Any here, but in fact it's just T
|
||||
result.length
|
||||
}
|
||||
Reference in New Issue
Block a user