Skip to content

Conversation

liufengyun
Copy link
Contributor

This is a partial fix to #5831 . Once we have #5743, we can add a test case.

def this() = this("")
def toMessage(implicit ctx: Context): Message = getMessage
def toMessage(implicit ctx: Context): Message = super.getMessage
override def getMessage: String = throw new Exception("Use toMessage instead for TypeError")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be annoying but at least no error messages will be empty due to this bug in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, it helped find the problem in Formatting.scala. Thanks for suggesting it 👍

@nicolasstucki nicolasstucki merged commit 47c51dd into scala:master Feb 2, 2019
@nicolasstucki nicolasstucki deleted the fix-missing-message branch February 2, 2019 06:34
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