Do not consider descriptors equality as a reason not to refine type
Otherwise, it results in skipping refinement for JobNode when requested from JVM module while it's necessary because CompletionHandlerBase's content depends on the module
This commit is contained in:
committed by
Dmitry Savvinov
parent
9c27abde7f
commit
2bf6bd3724
+11
@@ -0,0 +1,11 @@
|
||||
package foo
|
||||
|
||||
internal expect abstract class CompletionHandlerBase() {
|
||||
abstract fun invoke(cause: Throwable?)
|
||||
}
|
||||
|
||||
internal abstract class JobNode : CompletionHandlerBase()
|
||||
|
||||
public typealias CompletionHandler = (cause: Throwable?) -> Unit
|
||||
|
||||
fun bar(x: CompletionHandler) { x.hashCode() }
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package foo
|
||||
|
||||
private class CancelFutureOnCancel : JobNode() {
|
||||
override fun invoke(cause: Throwable?) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
internal actual abstract class CompletionHandlerBase actual constructor() : CompletionHandler {
|
||||
actual abstract override fun invoke(cause: Throwable?)
|
||||
}
|
||||
|
||||
fun main() {
|
||||
bar(CancelFutureOnCancel())
|
||||
}
|
||||
Reference in New Issue
Block a user