diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-11-14 17:10:54 +0100 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-11-17 10:04:23 +0100 |
commit | 6a398a2d551534157f14c4bba103c3dff9b85c18 (patch) | |
tree | 3fac284ff9d3dbb9a3fc149a615971576fbd8106 /src/dotty/tools/dotc/reporting | |
parent | adb37eee8974be841ff5eef2655c23394c05badb (diff) | |
download | dotty-6a398a2d551534157f14c4bba103c3dff9b85c18.tar.gz dotty-6a398a2d551534157f14c4bba103c3dff9b85c18.tar.bz2 dotty-6a398a2d551534157f14c4bba103c3dff9b85c18.zip |
Unlink type when entering clashing package
Here we unlink the existing type that clashes with the package to be
entered into the symbol table, issue an error and the proceed to enter
the rest of the symbols.
My concern with this approach is what happens during typechecking
if other things reference the unlinked type.
Diffstat (limited to 'src/dotty/tools/dotc/reporting')
-rw-r--r-- | src/dotty/tools/dotc/reporting/diagnostic/messages.scala | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/reporting/diagnostic/messages.scala b/src/dotty/tools/dotc/reporting/diagnostic/messages.scala index 5e6a402ef..a2557194c 100644 --- a/src/dotty/tools/dotc/reporting/diagnostic/messages.scala +++ b/src/dotty/tools/dotc/reporting/diagnostic/messages.scala @@ -790,7 +790,8 @@ object messages { val explanation = "" } - case class SeqWildcardPatternPos()(implicit ctx: Context) extends Message(31) { + case class SeqWildcardPatternPos()(implicit ctx: Context) + extends Message(31) { val kind = "Syntax" val msg = "`_*' can be used only for last argument" val explanation = { @@ -891,4 +892,11 @@ object messages { |""" } } + + case class PkgDuplicateSymbol(existing: Symbol)(implicit ctx: Context) + extends Message(33) { + val kind = "Duplicate Type" + val msg = hl"trying to define package with same name as `$existing`" + val explanation = "" + } } |