summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala7
1 files changed, 5 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 a6fccb50c2..abe2248b3e 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -659,7 +659,10 @@ trait Parsers {
t
}
- /** Type ::= Type1 [where `{' {WhereClause} `}']
+ /** Type ::= Type1 [for_some `{' WhereClause {semi WhereClause}} `}']
+ * WhereClause ::= type TypeDcl
+ * | val ValDcl
+ * |
*/
def typ(): Tree = {
val t = typ1()
@@ -2211,7 +2214,7 @@ trait Parsers {
templateBody()
} else {
if (inToken == LPAREN)
- syntaxError((if (traitParentSeen) "parents of traits" else "traits")+
+ syntaxError((if (traitParentSeen) "parents of traits" else "traits or objects")+
" may not have parameters", true)
(emptyValDef, List())
}