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

Added a second trace for global init checker showing creation of mutable fields #19996

Merged
merged 3 commits into from
Mar 25, 2024

Conversation

EnzeXing
Copy link
Contributor

No description provided.

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.

I'd suggest to not print the trace if the length of the trace is only 1.

Otherwise this LGTM.

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

It's great to have this capability 👍

@@ -9,3 +9,4 @@
|│ ^^^^^^^
|└── (() => x) // warn [ global-irrelevance3.scala:9 ]
| ^
|The mutable state is created through:
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is empty --- could be a latent problem with the existing trace.

compiler/src/dotty/tools/dotc/transform/init/Objects.scala Outdated Show resolved Hide resolved
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.

LGTM

@olhotak olhotak merged commit a5bb6be into scala:main Mar 25, 2024
19 checks passed
@olhotak olhotak deleted the init-checker-trace branch March 25, 2024 13:27
@Kordyjan Kordyjan added this to the 3.4.2 milestone Mar 28, 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