Skip to content

Add test for explicit backing fields#2941

Open
jaschdoc wants to merge 1 commit into
mainfrom
ebf-bug2873
Open

Add test for explicit backing fields#2941
jaschdoc wants to merge 1 commit into
mainfrom
ebf-bug2873

Conversation

@jaschdoc
Copy link
Copy Markdown
Collaborator

@jaschdoc jaschdoc commented May 11, 2026

This PR adds a test for #2873, asserting that it is not yet implemented. An implementation will be added in a subsequent PR.

See KEEP 430 for further details of this feature (also linked in #2873)

@jaschdoc jaschdoc marked this pull request as ready for review May 11, 2026 12:36
@jaschdoc jaschdoc requested a review from troelsbjerre as a code owner May 11, 2026 12:36
@jaschdoc jaschdoc marked this pull request as draft May 11, 2026 12:48
@jaschdoc jaschdoc marked this pull request as ready for review May 11, 2026 12:53
@jaschdoc
Copy link
Copy Markdown
Collaborator Author

@troelsbjerre ready for review now, apologies! :)

@jaschdoc jaschdoc force-pushed the ebf-bug2873 branch 2 times, most recently from 0edc35c to 526d6d7 Compare May 11, 2026 13:35
troelsbjerre
troelsbjerre previously approved these changes May 12, 2026
Comment on lines +45 to +46
@field:Anno
@property:Anno
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This still only shows up once...

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That's correct. In the ideal world, it should be returned twice or once as annotatedPropertyAndFieldViaUseSiteTargets and once as annotatedPropertyAndFieldViaUseSiteTargets.field. The current behavior is due to the fact that KSP uses the property as a stand-in for the field and deduplicates symbols. It's a limitation, but I'm working a proper solution. This test only asserts that it works with the current implementation.

@jaschdoc
Copy link
Copy Markdown
Collaborator Author

Rebased on main to resolve conflicts.

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