Skip to content

Commit

Permalink
NPE repro
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisTsar committed Apr 7, 2024
1 parent 6d85310 commit 8449e19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import org.junit.runners.Parameterized
import java.io.File
import java.util.jar.*

// testJs, testAndroidNative, testLinuxX64 succeed with KSP1 but fail with KSP2.

@RunWith(Parameterized::class)
class KMPImplementedIT(useKSP2: Boolean) {
@Rule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.example

annotation class MyAnnotation
annotation class MyAnnotation(val x: String = "")
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ class ValidateProcessor(val codeGenerator: CodeGenerator, val logger: KSPLogger)

val toValidate = resolver.getSymbolsWithAnnotation("com.example.MyAnnotation")
toValidate.forEach {
it.annotations.forEach {
it.arguments
}
if (!it.validate()) {
logger.error("$it.validate(): not ok")
}
Expand Down

0 comments on commit 8449e19

Please sign in to comment.