Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Warnings are not reflected in trees #23586

Unanswered
som-snytt asked this question in Compiler internals Q&A
Discussion options

"Errors" may be emitted, as a side effect, but correspond to a tree that isErroneous.

My code editor correlates the diagnostic with a source position, and that is where the red squiggle appears.

But warnings do not have a corresponding tree state. They are only positioned diagnostics (where the yellow squiggle appears).

I can test if tree.isErroneous but not tree.isDubious. Why is that? Are warnings fundamentally second-class annotations?

I just had a minor case where I might have tested isDubious to avoid warning twice.

Trees may be deemed in error internally, but not reported because other strategies are tried (other implicits, etc). There is no such mechanism for warnings.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /