Skip to content

Commit

Permalink
Merge pull request #76 from ForteScarlet/logical-downgrade
Browse files Browse the repository at this point in the history
If the TargetMarker match is unsuccessful, then continue with the original logic.
  • Loading branch information
ForteScarlet authored Jan 19, 2025
2 parents 2a672b4 + 4857c20 commit e8a054e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/IProject.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object IProject : ProjectDetail() {

// Remember the libs.versions.toml!
val ktVersion = "2.1.0"
val pluginVersion = "0.10.0"
val pluginVersion = "0.10.1"

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,13 @@ private fun FirValueParameter.toValueParameter(session: FirSession, index: Int):
fun OriginSymbol.checkSame(markerId: String, declaration: IrFunction): Boolean {
if (targetMarker != null) {
val anno = declaration.annotations.firstOrNull { it.symbol.owner.parentAsClass.classId == targetMarker }
if (anno == null) return false

val valueArgument = anno.getValueArgument(Name.identifier("value")) as? IrConst ?: return false
return markerId == valueArgument.value
if (anno != null) {
val valueArgument = anno.getValueArgument(Name.identifier("value")) as? IrConst
if (markerId == valueArgument?.value) {
return true
}
}
// 如果匹配不成功,继续原本的逻辑
}

// callableId
Expand Down

0 comments on commit e8a054e

Please sign in to comment.