summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2010-07-08 15:58:52 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2010-07-08 15:58:52 +0000
commit3c85f135693904cc0f433406c88842aa79e0140e (patch)
treed144f62baa905b2bf09cb361f2f3a0652a27a107 /src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
parentd7814a235963f40f4de1bf49efd4b22a8b0da5db (diff)
downloadscala-3c85f135693904cc0f433406c88842aa79e0140e.tar.gz
scala-3c85f135693904cc0f433406c88842aa79e0140e.tar.bz2
scala-3c85f135693904cc0f433406c88842aa79e0140e.zip
closes #3247: syntax error regarding context bo...
closes #3247: syntax error regarding context bounds generalized to include view bounds as we cannot easily be more specific no review
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index f72e45bd99..7a28fd0538 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -1823,7 +1823,7 @@ self =>
if (in.token != RPAREN) {
if (in.token == IMPLICIT) {
if (!contextBounds.isEmpty)
- syntaxError("cannot have both implicit parameters and context bounds `: ...' on type parameters", false)
+ syntaxError("cannot have both implicit parameters and context bounds `: ...' or view bounds `<% ...' on type parameters", false)
in.nextToken()
implicitmod = Flags.IMPLICIT
}
@@ -2331,7 +2331,7 @@ self =>
classContextBounds = contextBoundBuf.toList
val tstart = (in.offset::classContextBounds.map(_.pos.startOrPoint)).min
if (!classContextBounds.isEmpty && mods.hasFlag(Flags.TRAIT)) {
- syntaxError("traits cannot have type parameters with context bounds `: ...'", false)
+ syntaxError("traits cannot have type parameters with context bounds `: ...' nor view bounds `<% ...'", false)
classContextBounds = List()
}
val constrAnnots = annotations(false, true)