diff options
author | Martin Odersky <odersky@gmail.com> | 2008-11-13 10:49:26 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-11-13 10:49:26 +0000 |
commit | a38b62f23a07681aa641f981a50dafdea6e3dde7 (patch) | |
tree | 7f37904aa92d923625bb5827bd296d213eb14f3c /src/compiler | |
parent | 7848f0ffaf7e6909f9e1a046cc8377b2fad6a28c (diff) | |
download | scala-a38b62f23a07681aa641f981a50dafdea6e3dde7.tar.gz scala-a38b62f23a07681aa641f981a50dafdea6e3dde7.tar.bz2 scala-a38b62f23a07681aa641f981a50dafdea6e3dde7.zip |
Converted conpountType to infixType in legal cl...
Converted conpountType to infixType in legal closure parameter type;
fixed bug for parsing virtual traits.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 6 |
1 files changed, 4 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 71f8287a42..b7032f8048 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -1057,7 +1057,9 @@ trait Parsers extends NewScanners with MarkupParsers { t = (t /: annotations(false)) (makeAnnotated) } else { t = atPos(pos) { - val tpt = if (location != Local) compoundType(false) else typ() + val tpt = + if (location != Local) infixType(false, InfixMode.FirstOp) + else typ() if (isWildcard(t)) (placeholderParams: @unchecked) match { case (vd @ ValDef(mods, name, _, _)) :: rest => @@ -2272,7 +2274,7 @@ trait Parsers extends NewScanners with MarkupParsers { def templateOpt(mods: Modifiers, name: Name, constrMods: Modifiers, vparamss: List[List[ValDef]]): Template = { val pos = inCurrentPos; val (parents0, argss, self, body) = - if (inToken == EXTENDS || settings.Xexperimental.value && (mods hasFlag TRAIT) && inToken == SUBTYPE) { + if (inToken == EXTENDS || settings.Xexperimental.value && (mods hasFlag Flags.TRAIT) && inToken == SUBTYPE) { inNextToken template(mods hasFlag Flags.TRAIT) } else { |