mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 00:21:26 +00:00
KT-11410: Class hierarchy for parts/facade of multi-file class.
Preserve static initialization semantics for parts by introducing a special "clinit trigger" class.
Insert "static initialization trigger" call to every method of a part class, remove this call on inline.
Always mangle names for private functions in multifile class parts to avoid resolution clashes on inheritance.
NB in codegen tests initializers for all non-const vals are wrapped in 'run { ... }',
so that the initializer is not a constant expression, and some static initialization code should be generated.
This commit is contained in:
@@ -7,4 +7,4 @@ public final class test/Foo {
|
||||
synthetic final class test/Foo__InlineOnlyMultifileKt {
|
||||
public final static method foo(): void
|
||||
private final static method inlineOnly(): void
|
||||
}
|
||||
}
|
||||
@@ -3,5 +3,5 @@ public final class test/Foo
|
||||
|
||||
@kotlin.Metadata
|
||||
synthetic final class test/Foo__EmptyMultifileFacadeKt {
|
||||
private final static method privateOnly(): void
|
||||
}
|
||||
private final static method privateOnly$emptyMultifileFacade_kt(): void
|
||||
}
|
||||
Reference in New Issue
Block a user