-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add note about type mismatch in automatically inserted apply argument #20023
Conversation
|
The note is not always relevant, for example consider: def Test = List(1,2)("hello") Does that clarify anything to say that:
? As a middle ground, I moved the message to |
Co-Authored-By: Jan-Pieter van den Heuvel <[email protected]> Co-Authored-By: Lucas Nouguier <[email protected]>
The pickling failure in "Applications.scala" is just due to an extra line break… ➜ ~/dotty git:(mb/19680) diff before-pickling.txt after-pickling.txt
17956,17957c17956,17957
< dotty.tools.dotc.reporting.Diagnostic
< .Error
---
> dotty.tools.dotc.reporting.
> Diagnostic.Error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement. Otherwise LGTM
I was able to reproduce (with What I triedI tried this, but it compiles successfully with package dotty.tools.dotc.reporting.Diagnostic
package Diagnostic
class Error
def adipiscing() =
def elit() =
def nunc() =
def vel() =
def sapien() =
def congue() =
def lacus() =
def duis() =
def quam() =
def eleifend() =
def ultricies() =
def morbi() =
def pellentesque() =
val dia: Any = ???
dia match
case _: String =>
dia match
case _: String =>
dia match
case _: String => new Diagnostic.Error()
case _ => dia
case _ => dia
case _ => dia
pellentesque()
morbi()
ultricies()
eleifend()
quam()
duis()
lacus()
congue()
sapien()
vel()
nunc()
elit()
@main def Test = adipiscing() As a workaround, I just moved |
@odersky: I removed the last line of the message, as discussed. |
Started during the last spree with @jan-pieter and @iusildra.
Fixes #19680.