K2: Refine how JDK members are mapped to built-in classes
Previously, the semantic was more-or-less correct for most of the cases but some corner one, like `sort` in MutableList didn't work properly. Namely, `sort` should be marked there in a way to forbid to call it everywhere beside super-calls. Also, overriding it should be allowed. Mostly, the logic was re-written to K2 model from K1-related JvmBuiltInsCustomizer. ^KT-57694 In progress ^KT-57269 Fixed
This commit is contained in:
committed by
Space Team
parent
161fe1d2ca
commit
2e5b783cc6
@@ -74,6 +74,14 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
|
||||
overridden:
|
||||
public final fun <get-ordinal> (): kotlin.Int declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] <root>.Test0?>? [fake_override]
|
||||
overridden:
|
||||
public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
CLASS ENUM_CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.Test1>]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test1
|
||||
CONSTRUCTOR visibility:private <> (x:kotlin.Int) returnType:<root>.Test1 [primary]
|
||||
@@ -153,6 +161,14 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
|
||||
overridden:
|
||||
public final fun <get-ordinal> (): kotlin.Int declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] <root>.Test1?>? [fake_override]
|
||||
overridden:
|
||||
public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
CLASS ENUM_CLASS name:Test2 modality:ABSTRACT visibility:public superTypes:[kotlin.Enum<<root>.Test2>]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test2
|
||||
CONSTRUCTOR visibility:private <> (x:kotlin.Int) returnType:<root>.Test2 [primary]
|
||||
@@ -236,6 +252,14 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
|
||||
overridden:
|
||||
public final fun <get-ordinal> (): kotlin.Int [fake_override] declared in <root>.Test2
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] <root>.Test2?>? [fake_override]
|
||||
overridden:
|
||||
public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] <root>.Test2?>? [fake_override] declared in <root>.Test2
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in <root>.Test2
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
ENUM_ENTRY name:ONE
|
||||
init: EXPRESSION_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.Test2.ONE'
|
||||
@@ -301,6 +325,14 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
|
||||
overridden:
|
||||
public final fun <get-ordinal> (): kotlin.Int [fake_override] declared in <root>.Test2
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] <root>.Test2?>? [fake_override]
|
||||
overridden:
|
||||
public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] <root>.Test2?>? [fake_override] declared in <root>.Test2
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in <root>.Test2
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Test2
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test2'
|
||||
@@ -356,3 +388,11 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
|
||||
overridden:
|
||||
public final fun <get-ordinal> (): kotlin.Int declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] <root>.Test2?>? [fake_override]
|
||||
overridden:
|
||||
public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
|
||||
|
||||
Reference in New Issue
Block a user