Do not reference object's toString result in exception messages
Since we put object's hash code in toString, we end up in putting non-stable hash code to constant table, which leads to unstable binaries. #KTI-1193 Fixed
This commit is contained in:
committed by
Space Team
parent
c2acb77b84
commit
b36e1f1a5b
@@ -20,7 +20,7 @@ enum class OwnerKind {
|
||||
fun getMemberOwnerKind(descriptor: DeclarationDescriptor): OwnerKind = when (descriptor) {
|
||||
is PackageFragmentDescriptor -> PACKAGE
|
||||
is ClassDescriptor -> IMPLEMENTATION
|
||||
else -> throw AssertionError("Unexpected declaration container: $this")
|
||||
else -> throw AssertionError("Unexpected declaration container: $descriptor")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ object FirJvmVisibilityConverter : Fir2IrVisibilityConverter() {
|
||||
JavaVisibilities.PackageVisibility -> org.jetbrains.kotlin.load.java.JavaDescriptorVisibilities.PACKAGE_VISIBILITY
|
||||
JavaVisibilities.ProtectedStaticVisibility -> org.jetbrains.kotlin.load.java.JavaDescriptorVisibilities.PROTECTED_STATIC_VISIBILITY
|
||||
JavaVisibilities.ProtectedAndPackage -> org.jetbrains.kotlin.load.java.JavaDescriptorVisibilities.PROTECTED_AND_PACKAGE
|
||||
else -> error("Unknown visibility: $this")
|
||||
else -> error("Unknown visibility: $visibility")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import org.jetbrains.kotlin.descriptors.DescriptorVisibility
|
||||
abstract class Fir2IrVisibilityConverter {
|
||||
object Default : Fir2IrVisibilityConverter() {
|
||||
override fun convertPlatformVisibility(visibility: Visibility): DescriptorVisibility {
|
||||
error("Unknown visibility: $this")
|
||||
error("Unknown visibility: $visibility")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user