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 &&
|
||||
(valueParameters.any { it.isCrossinline } || visibility == Visibilities.PRIVATE))
|
||||
|
||||
fun MemberDescriptor.isInlineOnly(): Boolean {
|
||||
if (this !is FunctionDescriptor ||
|
||||
!(hasInlineOnlyAnnotation() || DescriptorUtils.getDirectMember(this).hasInlineOnlyAnnotation())) return false
|
||||
assert(isInline) { "Function is not inline: $this" }
|
||||
return true
|
||||
}
|
||||
fun MemberDescriptor.isInlineOnly(): Boolean =
|
||||
this is FunctionDescriptor && isInline &&
|
||||
(hasInlineOnlyAnnotation() || DescriptorUtils.getDirectMember(this).hasInlineOnlyAnnotation())
|
||||
|
||||
private fun CallableMemberDescriptor.isReifiable() = typeParameters.any { it.isReified }
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// FILE: 1.kt
|
||||
// WITH_RUNTIME
|
||||
|
||||
package test
|
||||
inline fun stub() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user