Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Avoid diagnostic message forcing crashing the compiler #19113

Merged
merged 3 commits into from
Dec 17, 2023

Commits on Nov 30, 2023

  1. Configuration menu
    Copy the full SHA
    6875465 View commit details
    Browse the repository at this point in the history
  2. Move faking errors to HideNonSensicalMessages

    Because HideNonSensicalMessages looks at hasErrors, we need to narrow
    the faking to just the isNonSensical call
    dwijnand committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    4fb8e7c View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2023

  1. Call hasErrors first but then bump before doReport

    We can switch to a more straightforward hasErrors check in isHidden, but
    then we need to bump the errorCount before calling doReport, as doReport
    will then, necessarily, force the message.
    
    For reference, the way I test this manually is by:
      1. In ignoredConvertibleImplicits, changing back to `viewExists(imp, fail.expectedType)`
      2. In adapt1, removing the `dummyTreeOfType.unapply(tree).isEmpty` guard
      3. Compiling tests/neg/i18650.scala
    
    Also, while I'm here, instruct on the presence of
    -Yno-enrich-error-messages, like we do for -Yno-decode-stacktraces.
    dwijnand committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    31165f2 View commit details
    Browse the repository at this point in the history