Rework const val generation in multifile classes
Do not query MultifileClassCodegen#classBuilder early on: this causes the class file for the facade to be prematurely dumped to the disk in some cases, when that class file is not yet completely generated. Instead fork the logic in PropertyCodegen#generateSyntheticMethodIfNeeded: save metadata in parts, generate method in the facade
This commit is contained in:
@@ -11,6 +11,8 @@ public fun fn1b(): kotlin.Unit { /* compiled code */ }
|
||||
|
||||
public fun kotlin.String.fn2b(): kotlin.Unit { /* compiled code */ }
|
||||
|
||||
@kotlin.Deprecated public const val annotatedConstVal: kotlin.Int /* compiled code */
|
||||
|
||||
public val val1a: kotlin.Int /* compiled code */
|
||||
|
||||
private val kotlin.String.val2a: kotlin.Int /* compiled code */
|
||||
|
||||
@@ -9,3 +9,6 @@ public fun String.fn2a() {}
|
||||
|
||||
class ShouldNotBeVisible1
|
||||
interface ShouldNotBeVisible2
|
||||
|
||||
@Deprecated("deprecated")
|
||||
const val annotatedConstVal = 42
|
||||
|
||||
@@ -5,6 +5,10 @@ fun p1Fun() {}
|
||||
fun String.p1ExtFun() {}
|
||||
fun p1ExprFun(): Int = 0
|
||||
fun p1FunWithParams(x: Int): Int { return x }
|
||||
|
||||
val p1Val: Int = 0
|
||||
val String.p1ExtVal: Int get() = 0
|
||||
var p1Var: Int = 0
|
||||
var p1Var: Int = 0
|
||||
|
||||
@Deprecated("deprecated")
|
||||
const val annotatedConstVal = 42
|
||||
|
||||
@@ -2,6 +2,20 @@ PsiJetFileStubImpl[package=test]
|
||||
PACKAGE_DIRECTIVE:
|
||||
REFERENCE_EXPRESSION:[referencedName=test]
|
||||
IMPORT_LIST:
|
||||
PROPERTY:[fqName=test.annotatedConstVal, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReturnTypeRef=true, isExtension=false, isTopLevel=true, isVar=false, name=annotatedConstVal]
|
||||
MODIFIER_LIST:[public const]
|
||||
ANNOTATION_ENTRY:[hasValueArguments=false, shortName=Deprecated]
|
||||
CONSTRUCTOR_CALLEE:
|
||||
TYPE_REFERENCE:
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||
REFERENCE_EXPRESSION:[referencedName=Deprecated]
|
||||
TYPE_REFERENCE:
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
REFERENCE_EXPRESSION:[referencedName=kotlin]
|
||||
REFERENCE_EXPRESSION:[referencedName=Int]
|
||||
PROPERTY:[fqName=test.p1Val, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReturnTypeRef=true, isExtension=false, isTopLevel=true, isVar=false, name=p1Val]
|
||||
MODIFIER_LIST:[public]
|
||||
TYPE_REFERENCE:
|
||||
|
||||
Reference in New Issue
Block a user