You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, thank you for sharing this tool. I found a problem when trying to match multiline:
given:
private var otherField: String? = null
@JvmField
@Inject
var fileDownloader: FileDownloader? = null
Matcher:
.replaceAllWithVariables<KtExpression>(
matcher =
template {
val a by match<KtExpression>()
val b by match<KtExpression>()
"""
@JvmField
@Inject
var $a: $b? = null
""".trimIndent()
},
replaceWith = { (result, variables) ->
val a by variables
val b by variables
"""
@Inject
lateinit var $a: $b
""".trimIndent()
}
this tool will throw exception
Exception in thread "main" java.lang.IllegalStateException: Template references variable $a as a matcher of KtProperty, but variable was defined as a matcher of KtExpression
The text was updated successfully, but these errors were encountered:
Hello, thank you for sharing this tool. I found a problem when trying to match multiline:
given:
Matcher:
this tool will throw exception
The text was updated successfully, but these errors were encountered: