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

Enable -Ycheck-init on community projects and CI #10627

Closed
wants to merge 12 commits into from

Conversation

liufengyun
Copy link
Contributor

@liufengyun liufengyun commented Dec 3, 2020

Enable -Ycheck-init on community projects

Fix #10549

This PR is extracted from #10550. The current PR only refactors the code and does not include checking of global objects.

@liufengyun liufengyun force-pushed the safe-object-init2 branch 2 times, most recently from 76ad797 to 38af99f Compare December 4, 2020 09:39
@liufengyun liufengyun changed the title Enable -Ycheck-init on community projects Enable -Ycheck-init on community projects and CI Dec 4, 2020
- Make summary a proper class
- Rename isInternal to hasSource
- Enable hijacking check

- Refactor: remove useless parameter
- Check promotion of potentials
- Cache safely promoted potential

- Fix test case tests/init/neg/hybrid2.scala
- Split effect check into multiple methods
- Refactor ignored methods handling
  Ignore constructor call on Any, Object and AnyVal

- Add promotion tests
- Fix missing return
- Member promotion result override outer promotion result
Handle NoPrefix properly
Otherwise, looking up members will crash the compiler
The owners are different for the patches, and they are always safe.
Shapeless enabled `-Xfatal-warings`, the warnings make the CI fail.
@liufengyun
Copy link
Contributor Author

Superseded by #11385.

@liufengyun liufengyun closed this Feb 11, 2021
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.

Allow Init Checker to look within anonymous classes
1 participant