Process raw types during erasion properly
^KT-46670 Fixed ^KT-46476 Fixed
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
// FILE: OCNewFileActionBase.java
|
||||
public class OCNewFileActionBase<T extends OCNewFileActionBase<T>.CreateFileDialogBase> {
|
||||
public class CreateFileDialogBase { }
|
||||
|
||||
static OCNewFileActionBase get() { return new OCNewFileActionBase(); }
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun box(): String {
|
||||
// Before changes in raw types computation: (OCNewFileActionBase<OCNewFileActionBase<*>.CreateFileDialogBase!>..OCNewFileActionBase<out OCNewFileActionBase<*>.CreateFileDialogBase!>?)
|
||||
// After that: raw (OCNewFileActionBase<*>..OCNewFileActionBase<*>?)
|
||||
val x = OCNewFileActionBase.get()
|
||||
return "OK"
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: AbstractMessageLite.java
|
||||
|
||||
public abstract class AbstractMessageLite<
|
||||
MessageType extends AbstractMessageLite<MessageType, BuilderType>,
|
||||
BuilderType extends AbstractMessageLite.Builder<MessageType, BuilderType>>
|
||||
{
|
||||
public void writeDelimitedTo() {}
|
||||
|
||||
public abstract static class Builder<
|
||||
MessageType extends AbstractMessageLite<MessageType, BuilderType>,
|
||||
BuilderType extends Builder<MessageType, BuilderType>>
|
||||
{}
|
||||
}
|
||||
|
||||
// FILE: H.java
|
||||
public class H extends AbstractMessageLite {}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun f(h: H) {
|
||||
h.writeDelimitedTo()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
f(H())
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
package
|
||||
|
||||
public fun f(/*0*/ h: H): kotlin.Unit
|
||||
|
||||
public abstract class AbstractMessageLite</*0*/ MessageType : AbstractMessageLite<MessageType!, BuilderType!>!, /*1*/ BuilderType : AbstractMessageLite.Builder<MessageType!, BuilderType!>!> {
|
||||
public constructor AbstractMessageLite</*0*/ MessageType : AbstractMessageLite<MessageType!, BuilderType!>!, /*1*/ BuilderType : AbstractMessageLite.Builder<MessageType!, BuilderType!>!>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public open fun writeDelimitedTo(): kotlin.Unit
|
||||
|
||||
public abstract class Builder</*0*/ MessageType : AbstractMessageLite<MessageType!, BuilderType!>!, /*1*/ BuilderType : AbstractMessageLite.Builder<MessageType!, BuilderType!>!> {
|
||||
public constructor Builder</*0*/ MessageType : AbstractMessageLite<MessageType!, BuilderType!>!, /*1*/ BuilderType : AbstractMessageLite.Builder<MessageType!, BuilderType!>!>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public open class H : AbstractMessageLite<(raw) *, (raw) *> {
|
||||
public constructor H()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun writeDelimitedTo(): kotlin.Unit
|
||||
}
|
||||
Reference in New Issue
Block a user