[FE] Make constructors of sealed classes protected instead of internal

This commit is contained in:
Dmitriy Novozhilov
2021-02-11 10:41:07 +03:00
committed by TeamCityServer
parent e795c2c407
commit f3a8fcaea6
80 changed files with 167 additions and 97 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
sealed class Expr {
internal constructor() /* primary */ {
protected constructor() /* primary */ {
super/*Any*/()
/* <init>() */
+4 -4
View File
@@ -1,7 +1,7 @@
FILE fqName:<root> fileName:/sealedClasses.kt
CLASS CLASS name:Expr modality:SEALED visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Expr
CONSTRUCTOR visibility:internal <> () returnType:<root>.Expr [primary]
CONSTRUCTOR visibility:protected <> () returnType:<root>.Expr [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Expr modality:SEALED visibility:public superTypes:[kotlin.Any]'
@@ -10,7 +10,7 @@ FILE fqName:<root> fileName:/sealedClasses.kt
CONSTRUCTOR visibility:public <> (number:kotlin.Double) returnType:<root>.Expr.Const [primary]
VALUE_PARAMETER name:number index:0 type:kotlin.Double
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'internal constructor <init> () [primary] declared in <root>.Expr'
DELEGATING_CONSTRUCTOR_CALL 'protected constructor <init> () [primary] declared in <root>.Expr'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Const modality:FINAL visibility:public superTypes:[<root>.Expr]'
PROPERTY name:number visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:number type:kotlin.Double visibility:private [final]
@@ -42,7 +42,7 @@ FILE fqName:<root> fileName:/sealedClasses.kt
VALUE_PARAMETER name:e1 index:0 type:<root>.Expr
VALUE_PARAMETER name:e2 index:1 type:<root>.Expr
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'internal constructor <init> () [primary] declared in <root>.Expr'
DELEGATING_CONSTRUCTOR_CALL 'protected constructor <init> () [primary] declared in <root>.Expr'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Sum modality:FINAL visibility:public superTypes:[<root>.Expr]'
PROPERTY name:e1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:e1 type:<root>.Expr visibility:private [final]
@@ -83,7 +83,7 @@ FILE fqName:<root> fileName:/sealedClasses.kt
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Expr.NotANumber
CONSTRUCTOR visibility:private <> () returnType:<root>.Expr.NotANumber [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'internal constructor <init> () [primary] declared in <root>.Expr'
DELEGATING_CONSTRUCTOR_CALL 'protected constructor <init> () [primary] declared in <root>.Expr'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:NotANumber modality:FINAL visibility:public superTypes:[<root>.Expr]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden: