Skip to content

Fix warning about -Xcheck-macros#25757

Merged
bishabosha merged 2 commits intoscala:mainfrom
mbovel:mb/macros-warning-bis
Apr 14, 2026
Merged

Fix warning about -Xcheck-macros#25757
bishabosha merged 2 commits intoscala:mainfrom
mbovel:mb/macros-warning-bis

Conversation

@mbovel
Copy link
Copy Markdown
Member

@mbovel mbovel commented Apr 10, 2026

Discussing with @bishabosha and further investigating, I realized the warning I introduced yesterday in #25750 is wrong.

Code generated by macros is actually checked, even without -Xcheck-macros, here:

transform.TreeChecker.checkMacroGeneratedTree(tree1, expanded)
typedExpr(expanded) // Inline calls and constant fold code generated by the macro

The errors I am missing are due to these checks being run without an expected type, which I'll try to address separately (#25756).

This PR reverts #25750, but still rephrase to avoid saying these are runtime checks.

@mbovel mbovel requested a review from bishabosha April 10, 2026 12:58
@mbovel mbovel marked this pull request as ready for review April 10, 2026 12:58
@bishabosha bishabosha merged commit e1510e3 into scala:main Apr 14, 2026
105 of 107 checks passed
@mbovel mbovel deleted the mb/macros-warning-bis branch April 14, 2026 07:47
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.

2 participants