Skip to content

Commit b39eaca

Browse files
committed
feat(semantic): specify allowed annotations in unknown annotation error message
1 parent 5df3137 commit b39eaca

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

semantic/src/main/kotlin/tools/samt/semantic/SemanticModelAnnotationProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ internal class SemanticModelAnnotationProcessor(
3636
}
3737
else -> {
3838
context.error {
39-
message("Unknown annotation @${name}")
39+
message("Unknown annotation @${name}, allowed annotations are @Description and @Deprecated")
4040
highlight("invalid annotation", annotation.location)
4141
}
4242
}

semantic/src/test/kotlin/tools/samt/semantic/SemanticModelTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ class SemanticModelTest {
10981098
}
10991099
""".trimIndent()
11001100
parseAndCheck(
1101-
source to List(7) { "Error: Unknown annotation @Deprescription" }
1101+
source to List(7) { "Error: Unknown annotation @Deprescription, allowed annotations are @Description and @Deprecated" }
11021102
)
11031103
}
11041104

0 commit comments

Comments
 (0)