-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Warnings from -Winfer-union does not have a error message id #25073
Copy link
Copy link
Closed
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintarea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement
Description
Compiler version
3.8.3-RC1-bin-20260123-506b8a0-NIGHTLY
Minimized example
Warning added in #24258 see tests for examples that gives warnings.
Output Error/Warning message
-- Warning: tests/warn/infer-or-type.scala:6:18 ------------------------------------------------------------------------
6 | val _ = List(1).contains("") // warn
| ^^^^^^^^^^^^^^^^
| A type argument was inferred to be union type Int | String
| This may indicate a programming error.
-- Warning: tests/warn/infer-or-type.scala:7:10 ------------------------------------------------------------------------
7 | val _ = Pair(1, "") // warn
| ^^^^
| A type argument was inferred to be union type Int | String
| This may indicate a programming error.Why this Error/Warning was not helpful
The message was unhelpful because it does not have a error message id
Suggested improvement
It could be made more helpful by having a error message id.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintarea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement