Annotate generated static proxy methods as compiler-generated

This commit is contained in:
Chris Smowton
2022-06-30 12:48:11 +01:00
parent 466cf7573b
commit 5a47e1dd95
2 changed files with 8 additions and 0 deletions

View File

@@ -490,6 +490,7 @@ open class KotlinFileExtractor(
// but suppress outputting the body, which we will replace with a delegating call below.
forceExtractFunction(f, classId, extractBody = false, extractMethodAndParameterTypeAccesses = extractFunctionBodies, typeSubstitution = null, classTypeArgsIncludingOuterClasses = listOf(), idOverride = proxyFunctionId, locOverride = null)
addModifiers(proxyFunctionId, "static")
tw.writeCompiler_generated(proxyFunctionId, CompilerGeneratedKinds.JVMSTATIC_PROXY_METHOD.kind)
if (extractFunctionBodies) {
val realFunctionLocId = tw.getLocation(f)
extractExpressionBody(proxyFunctionId, realFunctionLocId).also { returnId ->
@@ -4537,5 +4538,6 @@ open class KotlinFileExtractor(
ENUM_CLASS_SPECIAL_MEMBER(5),
DELEGATED_PROPERTY_GETTER(6),
DELEGATED_PROPERTY_SETTER(7),
JVMSTATIC_PROXY_METHOD(8),
}
}