Skip to content

Resolve properties within annotation bodies - #256

Merged
bioball merged 2 commits into
apple:mainfrom
mimischi:annotation-body-definition
Oct 8, 2026
Merged

bioball merged 2 commits into
apple:mainfrom
mimischi:annotation-body-definition

Conversation

@mimischi

@mimischi mimischi commented Oct 7, 2026

Copy link
Copy Markdown
Member

Go to definition and hover on a property inside an annotation body, like
language in @SourceCode { language = "Pkl" }, resolved to the
annotation class instead of the property. The PklDeclaredTypeImpl of
an annotation spans the whole annotation including its body, so
findBySpan() never made it down to the property.

While adding tests for it, I noticed test has only been running the
snippet tests since #33, so
GoToDefinitionTest, HoverTest and friends never ran in CI. Fixed that
too, otherwise the new tests would not run either.

Comment thread build.gradle.kts
@mimischi
mimischi force-pushed the annotation-body-definition branch from 945d6cf to e96d9a9 Compare October 8, 2026 08:44

@bioball bioball left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@bioball
bioball merged commit 2caf4c6 into apple:main Oct 8, 2026
12 checks passed
@mimischi
mimischi deleted the annotation-body-definition branch October 9, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants