diff options
author | Martin Odersky <odersky@gmail.com> | 2007-07-26 17:41:00 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-07-26 17:41:00 +0000 |
commit | 7c236d237ccfd6e249d7ee24bb94663195f5e65e (patch) | |
tree | 6b2b64298c456a07e745d786a9d370e37ef232c4 | |
parent | 0b34dfbcfec17eda8634ff4f68cfe75503592bbf (diff) | |
download | scala-7c236d237ccfd6e249d7ee24bb94663195f5e65e.tar.gz scala-7c236d237ccfd6e249d7ee24bb94663195f5e65e.tar.bz2 scala-7c236d237ccfd6e249d7ee24bb94663195f5e65e.zip |
disabled dependent method types unless -Xexperi...
disabled dependent method types unless -Xexperimental
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index ff24719b18..c9916219b0 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -514,7 +514,7 @@ trait Namers { self: Analyzer => def apply(tp: Type) = { tp match { case SingleType(_, sym) => - if (sym.owner == meth && (vparams contains sym)) { + if (settings.Xexperimental.value && sym.owner == meth && (vparams contains sym)) { /* if (sym hasFlag IMPLICIT) { context.error(sym.pos, "illegal type dependence on implicit parameter") @@ -541,8 +541,10 @@ trait Namers { self: Analyzer => if (sym.owner == meth && (vparamSymss exists (_ contains sym))) context.error( sym.pos, - "illegal dependent method type: parameter appears in the type "+ - "of another parameter in the same section or an earlier one") + "illegal dependent method type"+ + (if (settings.Xexperimental.value) + ": parameter appears in the type of another parameter in the same section or an earlier one" + else "")) case _ => mapOver(tp) } |