69a7bf7f68
This fixes some cases where we infer some type variable inside one of the branches to Nothing instead of the expected type because Nothing appeared in some other branch. Specifically, we add an equality instead of a subtype constraint during completion of calls to synthetic functions for if/when, try and !!. We don't do it when the call contains a (possibly nested) elvis or is inside the RHS of an assignment. Otherwise, we would prevent some smart-casts. #KT-65882 Fixed
31 lines
2.1 KiB
Plaintext
Vendored
31 lines
2.1 KiB
Plaintext
Vendored
FILE fqName:<root> fileName:/KotlinInternal.kt
|
|
CLASS CLASS name:KotlinInternal modality:OPEN visibility:public superTypes:[kotlin.Any]
|
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.KotlinInternal
|
|
CONSTRUCTOR visibility:public <> () returnType:<root>.KotlinInternal [primary]
|
|
BLOCK_BODY
|
|
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
|
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:KotlinInternal modality:OPEN visibility:public superTypes:[kotlin.Any]'
|
|
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 kotlin.Any
|
|
$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 kotlin.Any
|
|
$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 kotlin.Any
|
|
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
|
FUN name:foo visibility:internal modality:OPEN <> ($this:<root>.KotlinInternal) returnType:kotlin.Unit
|
|
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInternal
|
|
BLOCK_BODY
|
|
PROPERTY name:a visibility:internal modality:OPEN [val]
|
|
FUN name:<get-a> visibility:internal modality:OPEN <> ($this:<root>.KotlinInternal) returnType:kotlin.Int
|
|
correspondingProperty: PROPERTY name:a visibility:internal modality:OPEN [val]
|
|
$this: VALUE_PARAMETER name:<this> type:<root>.KotlinInternal
|
|
BLOCK_BODY
|
|
RETURN type=kotlin.Nothing from='internal open fun <get-a> (): kotlin.Int declared in <root>.KotlinInternal'
|
|
CONST Int type=kotlin.Int value=1
|