- Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -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 | ||
| import config.Settings.Setting | ||
| import interfaces.Diagnostic.{ERROR, WARNING, INFO} | ||
| import interfaces.Diagnostic.{ERROR, INFO, WARNING} | ||
| ||
| import printing.Highlighting._ | ||
| import printing.Formatting | ||
| | ||
| | @@ -901,4 +900,23 @@ object messages { | |
| val msg = hl"trying to define package with same name as `$existing`" | ||
| val explanation = "" | ||
| } | ||
| | ||
| case class ExistentialTypesNoLongerSupported()(implicit ctx: Context) extends Message(34) { | ||
| 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 | ||
| ||
| | | ||
| | For example: | ||
| | | ||
| | Instead of using ${"forSome"} to specify a type variable | ||
| | | ||
| | ${"List[T forSome { type T }]"} | ||
| | | ||
| | Try using a wildcard type variable | ||
| | | ||
| | ${"List[_]"} | ||
| |""" | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
| } | ||
| | ||
| } | ||
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.
This line shouldn't need to be added IIRC.
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.
These imports that were removed were unused, that's why I removed them.
util.SourcePositionstill 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
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.
Nah, it's fine boyscout principle right? 😃. The one below however didn't need to change right?
Uh oh!
There was an error while loading. Please reload this page.
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.
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!