Skip to content

Conversation

@q-ata
Copy link
Contributor

@q-ata q-ata commented Nov 13, 2023

Decouple the checking of classes and global objects. The Ysafe-init-global flag can be used for checking global objects instead.

@Kordyjan Kordyjan requested a review from olhotak November 13, 2023 14:20
Copy link
Contributor

@olhotak olhotak left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM.

g(new B()) // error
val n: Int = 10
class B() { def foo() = n + 1 }
g(new e.B())
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
g(new e.B())
g(new B())

@olhotak olhotak enabled auto-merge November 20, 2023 18:22
@olhotak olhotak disabled auto-merge November 20, 2023 21:22
@liufengyun
Copy link
Contributor

A rebase is need to update the check fiiles due to #18930.

@olhotak olhotak enabled auto-merge November 27, 2023 16:32
@olhotak olhotak merged commit 41e7d95 into scala:main Nov 27, 2023
@olhotak olhotak deleted the optimize-check-init branch November 27, 2023 21:56
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
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