Skip to content

Commit 4857c20

Browse files
committed
If the TargetMarker match is unsuccessful, then continue with the original logic.
1 parent 2a672b4 commit 4857c20

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

buildSrc/src/main/kotlin/IProject.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ object IProject : ProjectDetail() {
1111

1212
// Remember the libs.versions.toml!
1313
val ktVersion = "2.1.0"
14-
val pluginVersion = "0.10.0"
14+
val pluginVersion = "0.10.1"
1515

1616
override val version: String = "$ktVersion-$pluginVersion"
1717

compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/SuspendTransformUserData.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,13 @@ private fun FirValueParameter.toValueParameter(session: FirSession, index: Int):
277277
fun OriginSymbol.checkSame(markerId: String, declaration: IrFunction): Boolean {
278278
if (targetMarker != null) {
279279
val anno = declaration.annotations.firstOrNull { it.symbol.owner.parentAsClass.classId == targetMarker }
280-
if (anno == null) return false
281-
282-
val valueArgument = anno.getValueArgument(Name.identifier("value")) as? IrConst ?: return false
283-
return markerId == valueArgument.value
280+
if (anno != null) {
281+
val valueArgument = anno.getValueArgument(Name.identifier("value")) as? IrConst
282+
if (markerId == valueArgument?.value) {
283+
return true
284+
}
285+
}
286+
// 如果匹配不成功,继续原本的逻辑
284287
}
285288

286289
// callableId

0 commit comments

Comments
 (0)