diff options
author | Enno Runne <enno@runne.net> | 2017-03-05 22:26:59 +0100 |
---|---|---|
committer | Enno Runne <enno@runne.net> | 2017-03-05 22:26:59 +0100 |
commit | c3ec6dfbdeadb2fc9e7ac191b4c1a4d6838e8a5b (patch) | |
tree | c1f544d278ed0da4be19fba83d2da3f3b66be7cd /compiler/src/dotty/tools/dotc/core | |
parent | 34e3508cccbbcc49554a4c5b13419769cc3c7bf9 (diff) | |
download | dotty-c3ec6dfbdeadb2fc9e7ac191b4c1a4d6838e8a5b.tar.gz dotty-c3ec6dfbdeadb2fc9e7ac191b4c1a4d6838e8a5b.tar.bz2 dotty-c3ec6dfbdeadb2fc9e7ac191b4c1a4d6838e8a5b.zip |
More detail in error messages
Split error messages for recursive method and overloaded method needs type into two (but
did not solve the analysis which to show).
Make CyclicReference type error construct corresponding error message.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/Types.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index 200e94a1e..f49d65350 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -19,6 +19,7 @@ import util.Positions.{Position, NoPosition} import util.Stats._ import util.{DotClass, SimpleMap} import reporting.diagnostic.Message +import reporting.diagnostic.messages.CyclicReferenceInvolving import ast.tpd._ import ast.TreeTypeMap import printing.Texts._ @@ -3856,7 +3857,7 @@ object Types { class CyclicReference private (val denot: SymDenotation) extends TypeError(s"cyclic reference involving $denot") { - def show(implicit ctx: Context) = s"cyclic reference involving ${denot.show}" + def toMessage(implicit ctx: Context) = CyclicReferenceInvolving(denot) } object CyclicReference { |