Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getDeclarationsInSourceOrder: use AA for companion objects #2098

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

ting-yuan
Copy link
Collaborator

@ting-yuan ting-yuan commented Sep 12, 2024

Members of companion objects can be compiled into ContainingClass.class
and ContainingClass$Companion.class. Therefore, the total ordering is
not recoverable from class files only.

Note that AA doesn't preserve the ordering among functions, static functions, and fields. Only the relative order inside each group can be guaranteed.

KSP1's behavior is left unchanged.

Mitigates #1898.

kuanyingchou and others added 2 commits September 11, 2024 17:38
Members of companion objects can be compiled into ContainingClass.class
and ContainingClass$Companion.class. Therefore, the total ordering is
not recoverable from class files only.

KSP1's behavior is left unchanged.
@ting-yuan ting-yuan merged commit 5eea483 into google:main Sep 12, 2024
3 checks passed
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.

3 participants