fix(scanner): Don't insert semicolon before constructor annotations#248
fix(scanner): Don't insert semicolon before constructor annotations#248VladimirMakaev merged 3 commits intofwcd:mainfrom
Conversation
5a1cc91 to
dec16de
Compare
…otation args Fixes two edge cases in check_annotation_then_constructor: 1. Fully-qualified annotation names (e.g. @com.example.Inject) are now handled by skipping dot-separated segments in the annotation name. 2. String literals inside annotation arguments (e.g. @bar(name = "x)y")) are now skipped over when counting parenthesis depth, preventing premature exit from the argument list.
|
Thanks for the fix! I found two edge cases that the lookahead in 1. Fully-qualified annotationsclass Foo
@com.example.Inject
constructor (x: Int) {}The scanner read Fix: After reading word characters for the annotation name, also skip 2. String literals containing parentheses in annotation argumentsclass Foo
@Bar(name = "some ) text")
constructor (x: Int) {}The Fix: When scanning inside Both edge cases now have test coverage. All 289 tests pass. |
|
Thank you for the review, the improvements/fixes and the merge! 🎉 🙇 |
No description provided.