Skip to content

Added error messages - Parsers.scala:712 #1842

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

Merged

Conversation

raindeerr
Copy link
Contributor

No description provided.

@raindeerr raindeerr force-pushed the existentialTypesMigrateErrorMessage branch from 8244f4c to 44b8b5c Compare December 21, 2016 09:56
Copy link
Contributor

@felixmulder felixmulder left a comment

Choose a reason for hiding this comment

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

Looks greatl (mostly)! A few minor snags, then we can merge this 👍

@@ -5,10 +5,9 @@ package diagnostic

import dotc.core._
import Contexts.Context, Decorators._, Symbols._, Names._, NameOps._, Types._
import util.{SourceFile, NoSource}
import util.{SourcePosition, NoSourcePosition}
import util.SourcePosition
Copy link
Contributor

Choose a reason for hiding this comment

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

This line shouldn't need to be added IIRC.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These imports that were removed were unused, that's why I removed them. util.SourcePosition still needs to be included as it is in use in the MessageContainers.

I can put the imports back in if that's what you want

Copy link
Contributor

Choose a reason for hiding this comment

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

Nah, it's fine boyscout principle right? 😃. The one below however didn't need to change right?

Copy link
Contributor Author

@raindeerr raindeerr Dec 21, 2016

Choose a reason for hiding this comment

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

That was my idea in cleaning up the used imports! 😄

No the one below shouldn't have changed, I've fixed that. That might have been the IDE trying to tidy up for me!

import config.Settings.Setting
import interfaces.Diagnostic.{ERROR, WARNING, INFO}
import interfaces.Diagnostic.{ERROR, INFO, WARNING}
Copy link
Contributor

Choose a reason for hiding this comment

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

This one shouldn't need to be changed either.

val kind = "Syntax"
val msg = "Existential types are no longer supported - use a wildcard or dependent type instead"
val explanation =
hl"""| The use of existential types is no longer supported and a wildcard or dependent type should be used instead
Copy link
Contributor

Choose a reason for hiding this comment

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

This row is too long, max should be 80 characters, split it so that it is shorter than 80 (preferably even shorter).

| Try using a wildcard type variable
|
| ${"List[_]"}
|"""
Copy link
Contributor

Choose a reason for hiding this comment

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

Throughout this explanation, there's no need for there to be a padding of whitespace after the |-signs. None of the other messages should be doing this.

@felixmulder felixmulder merged commit ee4f4a1 into scala:master Dec 21, 2016
@felixmulder
Copy link
Contributor

LGTM - thanks for the PR! 🎉

@raindeerr raindeerr deleted the existentialTypesMigrateErrorMessage branch December 21, 2016 21:27
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.

3 participants