Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,29 @@ public class StabilityAnalyzerTransformer(
private val analyzingTypes = ThreadLocal.withInitial { mutableSetOf<String>() }

override fun visitFunctionNew(declaration: IrFunction): IrStatement {
val functionName = declaration.name.asString()
val fqName = declaration.kotlinFqName.asString()
// Handle property getters - extract actual property name
// Property getters have names like "<get-propertyName>"
val rawFunctionName = declaration.name.asString()
val rawFqName = declaration.kotlinFqName.asString()

val nameAndFqn = if (rawFunctionName.startsWith("<get-") && rawFunctionName.endsWith(">")) {
// This is a property getter - extract property name
val propertyName = rawFunctionName.substring(5, rawFunctionName.length - 1)

// Build proper FQN by replacing <get-xxx> with property name
val propertyFqName = if (rawFqName.contains("<get-")) {
rawFqName.replace(Regex("<get-([^>]+)>"), "$1")
} else {
rawFqName
}

Pair(propertyName, propertyFqName)
} else {
Pair(rawFunctionName, rawFqName)
}

val functionName = nameAndFqn.first
val fqName = nameAndFqn.second

// Check if function has @TraceRecomposition annotation
val hasTraceRecomposition = declaration.hasAnnotation(traceRecompositionFqName)
Expand Down