Do not assert that function is inline in MemberDescriptor.isInlineOnly
This is a more accurate fix of the problem described in 946acd2416
This commit is contained in:
@@ -21,12 +21,9 @@ fun MemberDescriptor.isEffectivelyInlineOnly(): Boolean =
|
|||||||
isInlineOnlyOrReifiable() || (this is FunctionDescriptor && isSuspend && isInline &&
|
isInlineOnlyOrReifiable() || (this is FunctionDescriptor && isSuspend && isInline &&
|
||||||
(valueParameters.any { it.isCrossinline } || visibility == Visibilities.PRIVATE))
|
(valueParameters.any { it.isCrossinline } || visibility == Visibilities.PRIVATE))
|
||||||
|
|
||||||
fun MemberDescriptor.isInlineOnly(): Boolean {
|
fun MemberDescriptor.isInlineOnly(): Boolean =
|
||||||
if (this !is FunctionDescriptor ||
|
this is FunctionDescriptor && isInline &&
|
||||||
!(hasInlineOnlyAnnotation() || DescriptorUtils.getDirectMember(this).hasInlineOnlyAnnotation())) return false
|
(hasInlineOnlyAnnotation() || DescriptorUtils.getDirectMember(this).hasInlineOnlyAnnotation())
|
||||||
assert(isInline) { "Function is not inline: $this" }
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun CallableMemberDescriptor.isReifiable() = typeParameters.any { it.isReified }
|
private fun CallableMemberDescriptor.isReifiable() = typeParameters.any { it.isReified }
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
// FILE: 1.kt
|
// FILE: 1.kt
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
package test
|
package test
|
||||||
inline fun stub() {
|
inline fun stub() {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user