aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/reporting/diagnostic
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-12-13 10:21:16 +0100
committerFelix Mulder <felix.mulder@gmail.com>2016-12-13 10:21:16 +0100
commit559e49317912ce52c51e295346cebcafbb69462d (patch)
treebd5114adfa0f0e7362614cb637f3f4218a1870f9 /compiler/src/dotty/tools/dotc/reporting/diagnostic
parent2082307f725b208393044ddb21df753a5329f8ac (diff)
downloaddotty-559e49317912ce52c51e295346cebcafbb69462d.tar.gz
dotty-559e49317912ce52c51e295346cebcafbb69462d.tar.bz2
dotty-559e49317912ce52c51e295346cebcafbb69462d.zip
Add CyclicImplicitVal error to messages
Diffstat (limited to 'compiler/src/dotty/tools/dotc/reporting/diagnostic')
-rw-r--r--compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala b/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
index 489165e56..ce3cb48ec 100644
--- a/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
+++ b/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
@@ -899,4 +899,15 @@ object messages {
val msg = hl"trying to define package with same name as `$existing`"
val explanation = ""
}
+
+ case class CyclicImplicitVal(cycleSym: Symbol)(implicit ctx: Context)
+ extends Message(34) {
+ val kind = "Cyclic Reference"
+ val msg = em"cyclic reference involving $cycleSym"
+ val explanation =
+ hl"""|This happens when the right hand-side of $cycleSym's definition
+ |involves an implicit search.
+ |
+ |To avoid the error, give $cycleSym an explicit type."""
+ }
}