Serialize and deserialize 'header' modifier for descriptors
This fixes KT-17001 because now 'header' modifier is loaded correctly for deserialized members and the standard disambiguation in OverloadingConflictResolver.compareCallsByUsedArguments takes place, where header members are discriminated against the corresponding impl members #KT-17001 Fixed
This commit is contained in:
@@ -9743,6 +9743,7 @@ public final class DebugProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasFlags();
|
||||
@@ -9756,6 +9757,7 @@ public final class DebugProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
int getFlags();
|
||||
@@ -10463,6 +10465,7 @@ public final class DebugProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -10478,6 +10481,7 @@ public final class DebugProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -11822,6 +11826,7 @@ public final class DebugProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -11837,6 +11842,7 @@ public final class DebugProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -11852,6 +11858,7 @@ public final class DebugProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setFlags(int value) {
|
||||
@@ -11870,6 +11877,7 @@ public final class DebugProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearFlags() {
|
||||
@@ -17725,6 +17733,8 @@ public final class DebugProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasFlags();
|
||||
@@ -17741,6 +17751,8 @@ public final class DebugProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
int getFlags();
|
||||
@@ -18084,6 +18096,8 @@ public final class DebugProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -18102,6 +18116,8 @@ public final class DebugProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -18913,6 +18929,8 @@ public final class DebugProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -18931,6 +18949,8 @@ public final class DebugProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -18949,6 +18969,8 @@ public final class DebugProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setFlags(int value) {
|
||||
@@ -18970,6 +18992,8 @@ public final class DebugProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearFlags() {
|
||||
@@ -20015,6 +20039,7 @@ public final class DebugProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasFlags();
|
||||
@@ -20034,6 +20059,7 @@ public final class DebugProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
int getFlags();
|
||||
@@ -20391,6 +20417,7 @@ public final class DebugProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -20412,6 +20439,7 @@ public final class DebugProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -21211,6 +21239,7 @@ public final class DebugProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -21232,6 +21261,7 @@ public final class DebugProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -21253,6 +21283,7 @@ public final class DebugProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setFlags(int value) {
|
||||
@@ -21277,6 +21308,7 @@ public final class DebugProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearFlags() {
|
||||
|
||||
+6
-6
@@ -65,7 +65,8 @@ class DescriptorSerializer private constructor(
|
||||
|
||||
val flags = Flags.getClassFlags(
|
||||
hasAnnotations(classDescriptor), classDescriptor.visibility, classDescriptor.modality, classDescriptor.kind,
|
||||
classDescriptor.isInner, classDescriptor.isCompanionObject, classDescriptor.isData, classDescriptor.isExternal
|
||||
classDescriptor.isInner, classDescriptor.isCompanionObject, classDescriptor.isData, classDescriptor.isExternal,
|
||||
classDescriptor.isHeader
|
||||
)
|
||||
if (flags != builder.flags) {
|
||||
builder.flags = flags
|
||||
@@ -150,8 +151,6 @@ class DescriptorSerializer private constructor(
|
||||
|
||||
var hasGetter = false
|
||||
var hasSetter = false
|
||||
val lateInit = descriptor.isLateInit
|
||||
val isConst = descriptor.isConst
|
||||
|
||||
val compileTimeConstant = descriptor.compileTimeInitializer
|
||||
val hasConstant = compileTimeConstant != null && compileTimeConstant !is NullValue
|
||||
@@ -187,8 +186,8 @@ class DescriptorSerializer private constructor(
|
||||
|
||||
val flags = Flags.getPropertyFlags(
|
||||
hasAnnotations, descriptor.visibility, descriptor.modality, descriptor.kind, descriptor.isVar,
|
||||
hasGetter, hasSetter, hasConstant, isConst, lateInit, descriptor.isExternal,
|
||||
@Suppress("DEPRECATION") descriptor.isDelegated
|
||||
hasGetter, hasSetter, hasConstant, descriptor.isConst, descriptor.isLateInit, descriptor.isExternal,
|
||||
@Suppress("DEPRECATION") descriptor.isDelegated, descriptor.isHeader
|
||||
)
|
||||
if (flags != builder.flags) {
|
||||
builder.flags = flags
|
||||
@@ -233,7 +232,8 @@ class DescriptorSerializer private constructor(
|
||||
|
||||
val flags = Flags.getFunctionFlags(
|
||||
hasAnnotations(descriptor), descriptor.visibility, descriptor.modality, descriptor.kind, descriptor.isOperator,
|
||||
descriptor.isInfix, descriptor.isInline, descriptor.isTailrec, descriptor.isExternal, descriptor.isSuspend
|
||||
descriptor.isInfix, descriptor.isInline, descriptor.isTailrec, descriptor.isExternal, descriptor.isSuspend,
|
||||
descriptor.isHeader
|
||||
)
|
||||
if (flags != builder.flags) {
|
||||
builder.flags = flags
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
header fun stringToByteArray(str: String): ByteArray
|
||||
|
||||
header var prop: String
|
||||
|
||||
fun ttt() {}
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
impl fun stringToByteArray(str: String): ByteArray = byteArrayOf()
|
||||
|
||||
impl var prop: String = ""
|
||||
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
fun bar() {
|
||||
stringToByteArray("foo bar baz")
|
||||
prop
|
||||
prop = ""
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
-- Common --
|
||||
Exit code: OK
|
||||
Output:
|
||||
|
||||
-- JVM --
|
||||
Exit code: OK
|
||||
Output:
|
||||
|
||||
-- JVM (2) --
|
||||
Exit code: OK
|
||||
Output:
|
||||
+18
-9
@@ -32,27 +32,36 @@ abstract class AbstractMultiPlatformIntegrationTest : KtUsefulTestCase() {
|
||||
val commonSrc = File(root, "common.kt")
|
||||
val jsSrc = File(root, "js.kt")
|
||||
val jvmSrc = File(root, "jvm.kt")
|
||||
// TODO: consider inventing a more clever scheme
|
||||
val jvm2Src = File(root, "jvm2.kt")
|
||||
|
||||
val tmpdir = KotlinTestUtils.tmpDir(getTestName(true))
|
||||
|
||||
val commonDest = File(tmpdir, "common")
|
||||
val jvmDest = File(tmpdir, "jvm")
|
||||
val jsDest = File(File(tmpdir, "js"), "output.js")
|
||||
val commonDest = File(tmpdir, "common").absolutePath
|
||||
val jvmDest = File(tmpdir, "jvm").absolutePath
|
||||
val jsDest = File(File(tmpdir, "js"), "output.js").absolutePath
|
||||
val jvm2Dest = File(tmpdir, "jvm2").absolutePath
|
||||
|
||||
val result = buildString {
|
||||
appendln("-- Common --")
|
||||
appendln(K2MetadataCompiler().compile(listOf(commonSrc), "-d", commonDest.absolutePath))
|
||||
appendln(K2MetadataCompiler().compile(listOf(commonSrc), "-d", commonDest))
|
||||
|
||||
if (jvmSrc.exists()) {
|
||||
appendln()
|
||||
appendln("-- JVM --")
|
||||
append(K2JVMCompiler().compileBothWays(commonSrc, jvmSrc, "-d", jvmDest.absolutePath))
|
||||
appendln(K2JVMCompiler().compileBothWays(commonSrc, jvmSrc, "-d", jvmDest))
|
||||
}
|
||||
|
||||
if (jsSrc.exists()) {
|
||||
appendln()
|
||||
appendln("-- JS --")
|
||||
append(K2JSCompiler().compileBothWays(commonSrc, jsSrc, "-output", jsDest.absolutePath))
|
||||
appendln(K2JSCompiler().compileBothWays(commonSrc, jsSrc, "-output", jsDest))
|
||||
}
|
||||
|
||||
if (jvm2Src.exists()) {
|
||||
appendln()
|
||||
appendln("-- JVM (2) --")
|
||||
appendln(K2JVMCompiler().compile(listOf(jvm2Src), "-d", jvm2Dest, "-cp", listOf(commonDest, jvmDest).joinToString(File.pathSeparator)))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,8 +69,8 @@ abstract class AbstractMultiPlatformIntegrationTest : KtUsefulTestCase() {
|
||||
}
|
||||
|
||||
private fun CLICompiler<*>.compileBothWays(commonSource: File, platformSource: File, vararg additionalArguments: String): String {
|
||||
val platformFirst = compile(listOf(platformSource, commonSource), *additionalArguments).trimTrailingWhitespacesAndAddNewlineAtEOF()
|
||||
val commonFirst = compile(listOf(commonSource, platformSource), *additionalArguments).trimTrailingWhitespacesAndAddNewlineAtEOF()
|
||||
val platformFirst = compile(listOf(platformSource, commonSource), *additionalArguments)
|
||||
val commonFirst = compile(listOf(commonSource, platformSource), *additionalArguments)
|
||||
if (platformFirst != commonFirst) {
|
||||
assertEquals(
|
||||
"Compilation results are different when compiling [platform-specific, common] compared to when compiling [common, platform-specific]",
|
||||
@@ -80,5 +89,5 @@ abstract class AbstractMultiPlatformIntegrationTest : KtUsefulTestCase() {
|
||||
appendln("Exit code: $exitCode")
|
||||
appendln("Output:")
|
||||
appendln(output)
|
||||
}.trim()
|
||||
}.trimTrailingWhitespacesAndAddNewlineAtEOF().trimEnd('\r', '\n')
|
||||
}
|
||||
|
||||
+16
@@ -170,4 +170,20 @@ public class MultiPlatformIntegrationTestGenerated extends AbstractMultiPlatform
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/multiplatform/regressions")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Regressions extends AbstractMultiPlatformIntegrationTest {
|
||||
public void testAllFilesPresentInRegressions() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/regressions"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt17001")
|
||||
public void testKt17001() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/regressions/kt17001/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class JsMetadataVersion(vararg numbers: Int) : BinaryVersion(*numbers) {
|
||||
|
||||
companion object {
|
||||
@JvmField
|
||||
val INSTANCE = JsMetadataVersion(1, 0, 0)
|
||||
val INSTANCE = JsMetadataVersion(1, 0, 1)
|
||||
|
||||
@JvmField
|
||||
val INVALID_VERSION = JsMetadataVersion()
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ class JvmMetadataVersion(vararg numbers: Int) : BinaryVersion(*numbers) {
|
||||
|
||||
companion object {
|
||||
@JvmField
|
||||
val INSTANCE = JvmMetadataVersion(1, 1, 5)
|
||||
val INSTANCE = JvmMetadataVersion(1, 1, 6)
|
||||
|
||||
@JvmField
|
||||
val INVALID_VERSION = JvmMetadataVersion()
|
||||
|
||||
@@ -29,7 +29,7 @@ class BuiltInsBinaryVersion(vararg numbers: Int) : BinaryVersion(*numbers) {
|
||||
|
||||
companion object {
|
||||
@JvmField
|
||||
val INSTANCE = BuiltInsBinaryVersion(1, 0, 0)
|
||||
val INSTANCE = BuiltInsBinaryVersion(1, 0, 1)
|
||||
|
||||
@JvmField
|
||||
val INVALID_VERSION = BuiltInsBinaryVersion()
|
||||
|
||||
@@ -185,6 +185,7 @@ message Class {
|
||||
ClassKind
|
||||
isInner
|
||||
isData
|
||||
isHeader
|
||||
*/
|
||||
optional int32 flags = 1 [default = 6 /* public final class, no annotations */];
|
||||
|
||||
@@ -265,6 +266,8 @@ message Function {
|
||||
isInline
|
||||
isTailrec
|
||||
isExternal
|
||||
isSuspend
|
||||
isHeader
|
||||
*/
|
||||
optional int32 flags = 9 [default = 6 /* public final function, no annotations */];
|
||||
optional int32 old_flags = 1 [default = 6];
|
||||
@@ -303,6 +306,7 @@ message Property {
|
||||
hasConstant
|
||||
isExternal
|
||||
isDelegated
|
||||
isHeader
|
||||
*/
|
||||
optional int32 flags = 11 [default = 518 /* public (6) final property with getter (512) */];
|
||||
optional int32 old_flags = 1 [default = 2054];
|
||||
|
||||
@@ -39,6 +39,7 @@ public class Flags {
|
||||
public static final BooleanFlagField IS_INNER = FlagField.booleanAfter(CLASS_KIND);
|
||||
public static final BooleanFlagField IS_DATA = FlagField.booleanAfter(IS_INNER);
|
||||
public static final BooleanFlagField IS_EXTERNAL_CLASS = FlagField.booleanAfter(IS_DATA);
|
||||
public static final BooleanFlagField IS_HEADER_CLASS = FlagField.booleanAfter(IS_EXTERNAL_CLASS);
|
||||
|
||||
// Constructors
|
||||
|
||||
@@ -56,6 +57,7 @@ public class Flags {
|
||||
public static final BooleanFlagField IS_TAILREC = FlagField.booleanAfter(IS_INLINE);
|
||||
public static final BooleanFlagField IS_EXTERNAL_FUNCTION = FlagField.booleanAfter(IS_TAILREC);
|
||||
public static final BooleanFlagField IS_SUSPEND = FlagField.booleanAfter(IS_EXTERNAL_FUNCTION);
|
||||
public static final BooleanFlagField IS_HEADER_FUNCTION = FlagField.booleanAfter(IS_SUSPEND);
|
||||
|
||||
// Properties
|
||||
|
||||
@@ -67,6 +69,7 @@ public class Flags {
|
||||
public static final BooleanFlagField HAS_CONSTANT = FlagField.booleanAfter(IS_LATEINIT);
|
||||
public static final BooleanFlagField IS_EXTERNAL_PROPERTY = FlagField.booleanAfter(HAS_CONSTANT);
|
||||
public static final BooleanFlagField IS_DELEGATED = FlagField.booleanAfter(IS_EXTERNAL_PROPERTY);
|
||||
public static final BooleanFlagField IS_HEADER_PROPERTY = FlagField.booleanAfter(IS_DELEGATED);
|
||||
|
||||
// Parameters
|
||||
|
||||
@@ -94,7 +97,8 @@ public class Flags {
|
||||
boolean inner,
|
||||
boolean isCompanionObject,
|
||||
boolean isData,
|
||||
boolean isExternal
|
||||
boolean isExternal,
|
||||
boolean isHeader
|
||||
) {
|
||||
return HAS_ANNOTATIONS.toFlags(hasAnnotations)
|
||||
| MODALITY.toFlags(modality(modality))
|
||||
@@ -103,6 +107,7 @@ public class Flags {
|
||||
| IS_INNER.toFlags(inner)
|
||||
| IS_DATA.toFlags(isData)
|
||||
| IS_EXTERNAL_CLASS.toFlags(isExternal)
|
||||
| IS_HEADER_CLASS.toFlags(isHeader)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -147,7 +152,8 @@ public class Flags {
|
||||
boolean isInline,
|
||||
boolean isTailrec,
|
||||
boolean isExternal,
|
||||
boolean isSuspend
|
||||
boolean isSuspend,
|
||||
boolean isHeader
|
||||
) {
|
||||
return HAS_ANNOTATIONS.toFlags(hasAnnotations)
|
||||
| VISIBILITY.toFlags(visibility(visibility))
|
||||
@@ -159,6 +165,7 @@ public class Flags {
|
||||
| IS_TAILREC.toFlags(isTailrec)
|
||||
| IS_EXTERNAL_FUNCTION.toFlags(isExternal)
|
||||
| IS_SUSPEND.toFlags(isSuspend)
|
||||
| IS_HEADER_FUNCTION.toFlags(isHeader)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -174,7 +181,8 @@ public class Flags {
|
||||
boolean isConst,
|
||||
boolean lateInit,
|
||||
boolean isExternal,
|
||||
boolean isDelegated
|
||||
boolean isDelegated,
|
||||
boolean isHeader
|
||||
) {
|
||||
return HAS_ANNOTATIONS.toFlags(hasAnnotations)
|
||||
| VISIBILITY.toFlags(visibility(visibility))
|
||||
@@ -188,6 +196,7 @@ public class Flags {
|
||||
| HAS_CONSTANT.toFlags(hasConstant)
|
||||
| IS_EXTERNAL_PROPERTY.toFlags(isExternal)
|
||||
| IS_DELEGATED.toFlags(isDelegated)
|
||||
| IS_HEADER_PROPERTY.toFlags(isHeader)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -7936,6 +7936,7 @@ public final class ProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasFlags();
|
||||
@@ -7949,6 +7950,7 @@ public final class ProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
int getFlags();
|
||||
@@ -8544,6 +8546,7 @@ public final class ProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -8559,6 +8562,7 @@ public final class ProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -9659,6 +9663,7 @@ public final class ProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -9674,6 +9679,7 @@ public final class ProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -9689,6 +9695,7 @@ public final class ProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setFlags(int value) {
|
||||
@@ -9707,6 +9714,7 @@ public final class ProtoBuf {
|
||||
*ClassKind
|
||||
*isInner
|
||||
*isData
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearFlags() {
|
||||
@@ -13606,6 +13614,8 @@ public final class ProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasFlags();
|
||||
@@ -13622,6 +13632,8 @@ public final class ProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
int getFlags();
|
||||
@@ -13925,6 +13937,8 @@ public final class ProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -13943,6 +13957,8 @@ public final class ProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -14620,6 +14636,8 @@ public final class ProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -14638,6 +14656,8 @@ public final class ProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -14656,6 +14676,8 @@ public final class ProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setFlags(int value) {
|
||||
@@ -14677,6 +14699,8 @@ public final class ProtoBuf {
|
||||
*isInline
|
||||
*isTailrec
|
||||
*isExternal
|
||||
*isSuspend
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearFlags() {
|
||||
@@ -15324,6 +15348,7 @@ public final class ProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasFlags();
|
||||
@@ -15343,6 +15368,7 @@ public final class ProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
int getFlags();
|
||||
@@ -15670,6 +15696,7 @@ public final class ProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -15691,6 +15718,7 @@ public final class ProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -16381,6 +16409,7 @@ public final class ProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasFlags() {
|
||||
@@ -16402,6 +16431,7 @@ public final class ProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public int getFlags() {
|
||||
@@ -16423,6 +16453,7 @@ public final class ProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setFlags(int value) {
|
||||
@@ -16447,6 +16478,7 @@ public final class ProtoBuf {
|
||||
*hasConstant
|
||||
*isExternal
|
||||
*isDelegated
|
||||
*isHeader
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearFlags() {
|
||||
|
||||
+2
@@ -47,6 +47,7 @@ class MemberDeserializer(private val c: DeserializationContext) {
|
||||
Flags.IS_CONST.get(flags),
|
||||
Flags.IS_EXTERNAL_PROPERTY.get(flags),
|
||||
Flags.IS_DELEGATED.get(flags),
|
||||
Flags.IS_HEADER_PROPERTY.get(flags),
|
||||
proto,
|
||||
c.nameResolver,
|
||||
c.typeTable,
|
||||
@@ -174,6 +175,7 @@ class MemberDeserializer(private val c: DeserializationContext) {
|
||||
function.isInline = Flags.IS_INLINE.get(flags)
|
||||
function.isTailrec = Flags.IS_TAILREC.get(flags)
|
||||
function.isSuspend = Flags.IS_SUSPEND.get(flags)
|
||||
function.isHeader = Flags.IS_HEADER_FUNCTION.get(flags)
|
||||
return function
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ class DeserializedClassDescriptor(
|
||||
|
||||
override fun isData() = Flags.IS_DATA.get(classProto.flags)
|
||||
|
||||
override fun isHeader() = false
|
||||
override fun isHeader() = Flags.IS_HEADER_CLASS.get(classProto.flags)
|
||||
|
||||
override fun isImpl() = false
|
||||
|
||||
|
||||
+6
-8
@@ -19,7 +19,6 @@ package org.jetbrains.kotlin.serialization.deserialization.descriptors
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.descriptors.impl.*
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.protobuf.MessageLite
|
||||
import org.jetbrains.kotlin.serialization.Flags
|
||||
@@ -108,16 +107,16 @@ class DeserializedPropertyDescriptor(
|
||||
isConst: Boolean,
|
||||
isExternal: Boolean,
|
||||
isDelegated: Boolean,
|
||||
isHeader: Boolean,
|
||||
override val proto: ProtoBuf.Property,
|
||||
override val nameResolver: NameResolver,
|
||||
override val typeTable: TypeTable,
|
||||
override val sinceKotlinInfoTable: SinceKotlinInfoTable,
|
||||
override val containerSource: DeserializedContainerSource?
|
||||
) : DeserializedCallableMemberDescriptor,
|
||||
PropertyDescriptorImpl(containingDeclaration, original, annotations,
|
||||
modality, visibility, isVar, name, kind, SourceElement.NO_SOURCE, isLateInit, isConst, false, false,
|
||||
isExternal, isDelegated) {
|
||||
|
||||
) : DeserializedCallableMemberDescriptor, PropertyDescriptorImpl(
|
||||
containingDeclaration, original, annotations, modality, visibility, isVar, name, kind, SourceElement.NO_SOURCE,
|
||||
isLateInit, isConst, isHeader, false, isExternal, isDelegated
|
||||
) {
|
||||
override fun createSubstitutedCopy(
|
||||
newOwner: DeclarationDescriptor,
|
||||
newModality: Modality,
|
||||
@@ -127,8 +126,7 @@ class DeserializedPropertyDescriptor(
|
||||
): PropertyDescriptorImpl {
|
||||
return DeserializedPropertyDescriptor(
|
||||
newOwner, original, annotations, newModality, newVisibility, isVar, name, kind, isLateInit, isConst, isExternal,
|
||||
@Suppress("DEPRECATION") isDelegated,
|
||||
proto, nameResolver, typeTable, sinceKotlinInfoTable, containerSource
|
||||
@Suppress("DEPRECATION") isDelegated, isHeader, proto, nameResolver, typeTable, sinceKotlinInfoTable, containerSource
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user