summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2011-10-20 22:28:44 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2011-10-20 22:28:44 +0000
commit3921e5be742ff9523825037056e82b7b82db5932 (patch)
tree046e7f6ff585ba66c80825132974f52f5a3638e0 /src/compiler/scala/tools/nsc/typechecker
parent24eb4c5bb5b3ed0e6bb4ede3e68876cdbe7d18fc (diff)
downloadscala-3921e5be742ff9523825037056e82b7b82db5932.tar.gz
scala-3921e5be742ff9523825037056e82b7b82db5932.tar.bz2
scala-3921e5be742ff9523825037056e82b7b82db5932.zip
dependent methods types are now always enabled
for now, left the old if(settings.YdepMethTpes.value) guards in comments removed *.flags containing -Ydependent-method-types also updated one check file with one fewer error no review
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala10
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala8
2 files changed, 4 insertions, 14 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
index 874d1149a0..1b2b737074 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -1459,15 +1459,11 @@ trait Namers { self: Analyzer =>
this(p.info)
// can only refer to symbols in earlier parameter sections
// (if the extension is enabled)
- if (opt.dependentMethodTypes)
- okParams ++= vps
+ okParams ++= vps
}
}
- private def errorAddendum = (
- if (opt.dependentMethodTypes)
- ": parameter appears in the type of another parameter in the same section or an earlier one"
- else ""
- )
+ private def errorAddendum =
+ ": parameter appears in the type of another parameter in the same section or an earlier one"
}
@deprecated("Use underlyingSymbol instead", "2.10.0")
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 3cdfca9cf4..097def8390 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -724,7 +724,7 @@ trait Typers extends Modes with Adaptations {
context.undetparams =
inferExprInstance(tree, context.extractUndetparams(), pt,
// approximate types that depend on arguments since dependency on implicit argument is like dependency on type parameter
- if (settings.YdepMethTpes.value) mt.approximate else mt,
+ mt.approximate,
// if we are looking for a manifest, instantiate type to Nothing anyway,
// as we would get ambiguity errors otherwise. Example
// Looking for a manifest of Nil: This has many potential types,
@@ -1792,12 +1792,6 @@ trait Typers extends Modes with Adaptations {
error(vparam1.pos, "*-parameter must come last")
var tpt1 = checkNoEscaping.privates(meth, typedType(ddef.tpt))
- if (!settings.YdepMethTpes.value) {
- for (vparams <- vparamss1; vparam <- vparams) {
- checkNoEscaping.locals(context.scope, WildcardType, vparam.tpt); ()
- }
- checkNoEscaping.locals(context.scope, WildcardType, tpt1)
- }
checkNonCyclic(ddef, tpt1)
ddef.tpt.setType(tpt1.tpe)
val typedMods = removeAnnotations(ddef.mods)