[FIR] KT-56612: Fully-expand types when casting bare types
^KT-56612 Fixed Merge-request: KT-MR-8849 Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
0963bd25a8
commit
516efe77c9
+29
@@ -0,0 +1,29 @@
|
||||
// FIR_IDENTICAL
|
||||
|
||||
interface FlameGraphModel<T>
|
||||
|
||||
internal typealias CallUsageNode = CallTreeNode<BaseCallStackElement>
|
||||
|
||||
interface CallTreeNode<out T : Any> : TreeNodeWithParent<CallWithValue<T>>
|
||||
|
||||
interface TreeNodeWithParent<out Data>
|
||||
|
||||
interface CallWithValue<out T : Any>
|
||||
|
||||
abstract class BaseCallStackElement
|
||||
|
||||
open class CallUsageNodeFlameGraphModel<Call : Any> : FlameGraphModel<CallTreeNode<Call>>
|
||||
|
||||
fun foo(model: FlameGraphModel<CallUsageNode>) {
|
||||
// K1: Ok
|
||||
val afterCast = model as CallUsageNodeFlameGraphModel
|
||||
}
|
||||
|
||||
internal typealias CallTreeNodeTypealias<K> = CallTreeNode<K>
|
||||
|
||||
open class CallUsageNodeFlameGraphModelWithTypealiasedSupertypeArgument<Call : Any> : FlameGraphModel<CallTreeNodeTypealias<Call>>
|
||||
|
||||
fun bar(model: FlameGraphModel<CallUsageNode>) {
|
||||
// K1: Ok
|
||||
val afterCast = model as CallUsageNodeFlameGraphModelWithTypealiasedSupertypeArgument
|
||||
}
|
||||
Reference in New Issue
Block a user