-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Make safe init checker skip global objects #18906
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM.
tests/init/neg/i12544.scala
Outdated
g(new B()) // error | ||
val n: Int = 10 | ||
class B() { def foo() = n + 1 } | ||
g(new e.B()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there still an error here? Should there be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
g(new e.B()) | |
g(new B()) |
A rebase is need to update the check fiiles due to #18930. |
Decouple the checking of classes and global objects. The
Ysafe-init-global
flag can be used for checking global objects instead.