[FIR2IR] Fix nullability of converted raw types
#KT-65298 Fixed
This commit is contained in:
committed by
Space Team
parent
3b4ca56f74
commit
931480b12d
@@ -0,0 +1,29 @@
|
||||
FILE fqName:<root> fileName:/1.kt
|
||||
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<root>.Java1]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.A [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java1'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<root>.Java1]'
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:<root>.Java1, a:@[FlexibleNullability] <root>.List?) returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
public open fun foo (a: @[FlexibleNullability] <root>.List?): kotlin.Unit declared in <root>.Java1
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Java1
|
||||
VALUE_PARAMETER name:a index:0 type:@[FlexibleNullability] <root>.List?
|
||||
FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN <> ($this:<root>.Java1) returnType:@[FlexibleNullability] <root>.List? [fake_override]
|
||||
overridden:
|
||||
public open fun bar (): @[FlexibleNullability] <root>.List? declared in <root>.Java1
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Java1
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Java1
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in <root>.Java1
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in <root>.Java1
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
@@ -0,0 +1,8 @@
|
||||
class A : Java1 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java1*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// CHECK:
|
||||
// Mangled name: A
|
||||
// Public signature: /A|null[0]
|
||||
class A : Java1 {
|
||||
// CHECK:
|
||||
// Mangled name: A#<init>(){}
|
||||
// Public signature: /A.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: A#bar(){}List?
|
||||
// Public signature: /A.bar|-6805136188302315839[0]
|
||||
// Public signature debug description: bar(){}List?
|
||||
/* fake */ override fun bar(): List?
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: A#foo(List?){}
|
||||
// Public signature: /A.foo|-6260703452578085119[0]
|
||||
// Public signature debug description: foo(List?){}
|
||||
/* fake */ override fun foo(a: List?): Unit
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
FILE fqName:<root> fileName:/1.kt
|
||||
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<root>.Java1]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.A [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Java1'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<root>.Java1]'
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Java1
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in <root>.Java1
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in <root>.Java1
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:<root>.Java1, a:@[FlexibleNullability] <root>.List?) returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
public open fun foo (a: @[FlexibleNullability] <root>.List?): kotlin.Unit declared in <root>.Java1
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Java1
|
||||
VALUE_PARAMETER name:a index:0 type:@[FlexibleNullability] <root>.List?
|
||||
FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN <> ($this:<root>.Java1) returnType:@[FlexibleNullability] <root>.List? [fake_override]
|
||||
overridden:
|
||||
public open fun bar (): @[FlexibleNullability] <root>.List? declared in <root>.Java1
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Java1
|
||||
@@ -0,0 +1,13 @@
|
||||
// ISSUE: KT-65298
|
||||
// TARGET_BACKEND: JVM
|
||||
// SEPARATE_SIGNATURE_DUMP_FOR_K2
|
||||
// FILE: Java1.java
|
||||
|
||||
public class Java1 {
|
||||
public void foo(List a) {};
|
||||
public List bar() { return null; };
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
class A : Java1() {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class A : Java1 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java1*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// CHECK:
|
||||
// Mangled name: A
|
||||
// Public signature: /A|null[0]
|
||||
class A : Java1 {
|
||||
// CHECK:
|
||||
// Mangled name: A#<init>(){}
|
||||
// Public signature: /A.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: A#bar(){}List?
|
||||
// Public signature: /A.bar|-6805136188302315839[0]
|
||||
// Public signature debug description: bar(){}List?
|
||||
/* fake */ override fun bar(): List?
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: A#foo(List?){}
|
||||
// Public signature: /A.foo|-6260703452578085119[0]
|
||||
// Public signature debug description: foo(List?){}
|
||||
/* fake */ override fun foo(a: List?): Unit
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user