Fix compilation problems caused by migration to 2.0
This commit is contained in:
committed by
Space Team
parent
a35f2eb90e
commit
6114e4f068
+1
@@ -131,6 +131,7 @@ public class PrettyPrinter(public val indentSize: Int = 2) : Appendable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public inline fun checkIfPrinted(render: () -> Unit): Boolean {
|
public inline fun checkIfPrinted(render: () -> Unit): Boolean {
|
||||||
|
contract { callsInPlace(render, InvocationKind.EXACTLY_ONCE) }
|
||||||
val initialSize = builder.length
|
val initialSize = builder.length
|
||||||
render()
|
render()
|
||||||
return initialSize != builder.length
|
return initialSize != builder.length
|
||||||
|
|||||||
+2
-2
@@ -56,7 +56,7 @@ internal class JvmClassExtension : JvmClassExtensionVisitor(), KmClassExtension
|
|||||||
override fun accept(visitor: KmClassExtensionVisitor) {
|
override fun accept(visitor: KmClassExtensionVisitor) {
|
||||||
require(visitor is JvmClassExtensionVisitor)
|
require(visitor is JvmClassExtensionVisitor)
|
||||||
localDelegatedProperties.forEach {
|
localDelegatedProperties.forEach {
|
||||||
@Suppress("INVISIBLE_MEMBER") // getter.flags
|
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") // getter.flags
|
||||||
visitor.visitLocalDelegatedProperty(it.flags, it.name, it.getter.flags, it.setterFlags)?.let(it::accept)
|
visitor.visitLocalDelegatedProperty(it.flags, it.name, it.getter.flags, it.setterFlags)?.let(it::accept)
|
||||||
}
|
}
|
||||||
moduleName?.let(visitor::visitModuleName)
|
moduleName?.let(visitor::visitModuleName)
|
||||||
@@ -80,7 +80,7 @@ internal class JvmPackageExtension : JvmPackageExtensionVisitor(), KmPackageExte
|
|||||||
override fun accept(visitor: KmPackageExtensionVisitor) {
|
override fun accept(visitor: KmPackageExtensionVisitor) {
|
||||||
require(visitor is JvmPackageExtensionVisitor)
|
require(visitor is JvmPackageExtensionVisitor)
|
||||||
localDelegatedProperties.forEach {
|
localDelegatedProperties.forEach {
|
||||||
@Suppress("INVISIBLE_MEMBER") // getter.flags
|
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") // getter.flags
|
||||||
visitor.visitLocalDelegatedProperty(it.flags, it.name, it.getter.flags, it.setterFlags)?.let(it::accept)
|
visitor.visitLocalDelegatedProperty(it.flags, it.name, it.getter.flags, it.setterFlags)?.let(it::accept)
|
||||||
}
|
}
|
||||||
moduleName?.let(visitor::visitModuleName)
|
moduleName?.let(visitor::visitModuleName)
|
||||||
|
|||||||
@@ -100,9 +100,10 @@ class FlagDelegatesTest {
|
|||||||
field = param.takeLast(0)
|
field = param.takeLast(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
var noinlineModifierVar: String = ""
|
inline var noinlineModifierVar: () -> String
|
||||||
|
get() = { "" }
|
||||||
set(noinline param) {
|
set(noinline param) {
|
||||||
field = param.takeLast(0)
|
param()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -154,7 +155,7 @@ class FlagDelegatesTest {
|
|||||||
assertEquals("param", it?.name)
|
assertEquals("param", it?.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
assertProperty("noinlineModifierVar", true, false, true) {
|
assertProperty("noinlineModifierVar", true, true, true) {
|
||||||
assertEquals("param", it?.name)
|
assertEquals("param", it?.name)
|
||||||
assertEquals(true, it?.isNoinline)
|
assertEquals(true, it?.isNoinline)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user