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:
Ilmir Usmanov
2023-04-03 19:08:07 +02:00
committed by Space Team
parent c2acb77b84
commit b36e1f1a5b
3 changed files with 3 additions and 3 deletions
@@ -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")
}
}
}