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

Adds special treatment for Predef.classOf in object initialization checker #20945

Closed
wants to merge 1 commit into from

Conversation

EnzeXing
Copy link
Contributor

@EnzeXing EnzeXing commented Jul 2, 2024

The Predef.classOf is a stub method that is replaced by runtime class representation after compilation, so when the object initialization checker analyzes tasty file, any call to Predef.classOf should be treated specially, so warnings related to Predef.classOf can be avoided.

@Gedochao Gedochao requested a review from dwijnand July 3, 2024 11:23
@dwijnand dwijnand assigned liufengyun and unassigned dwijnand Jul 3, 2024
@dwijnand dwijnand requested review from liufengyun and removed request for dwijnand July 3, 2024 16:44
olhotak pushed a commit that referenced this pull request Sep 1, 2024
This is an updated PR of #20945, making the global initialization
checker skips the analysis of `Predef.classOf` in scala2-library, since
it is a stub method in tasty and is replaced by actual class
representations in the backend. This prevents related warnings when
running test_scala2_library_tasty.

---------

Co-authored-by: EnzeXing <[email protected]>
@olhotak
Copy link
Contributor

olhotak commented Sep 3, 2024

Closing in favour of #21523

@olhotak olhotak closed this Sep 3, 2024
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.

4 participants