summaryrefslogtreecommitdiff
path: root/sources/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2005-11-30 16:57:50 +0000
committerMartin Odersky <odersky@gmail.com>2005-11-30 16:57:50 +0000
commit634e743658f07343913457108339e5b93bb0ef14 (patch)
tree16f8e8116222893a475bb5e3c88b197d5e7c283b /sources/scala/tools/nsc/typechecker/Typers.scala
parentc037162241748b0b19612051c6fded8dc81916ca (diff)
downloadscala-634e743658f07343913457108339e5b93bb0ef14.tar.gz
scala-634e743658f07343913457108339e5b93bb0ef14.tar.bz2
scala-634e743658f07343913457108339e5b93bb0ef14.zip
*** empty log message ***
Diffstat (limited to 'sources/scala/tools/nsc/typechecker/Typers.scala')
-rwxr-xr-xsources/scala/tools/nsc/typechecker/Typers.scala7
1 files changed, 4 insertions, 3 deletions
diff --git a/sources/scala/tools/nsc/typechecker/Typers.scala b/sources/scala/tools/nsc/typechecker/Typers.scala
index 97a56f75f4..0df5c37f30 100755
--- a/sources/scala/tools/nsc/typechecker/Typers.scala
+++ b/sources/scala/tools/nsc/typechecker/Typers.scala
@@ -581,7 +581,7 @@ import collection.mutable.HashMap;
def typedValDef(vdef: ValDef): ValDef = {
val sym = vdef.symbol;
val typer1 = if (sym.hasFlag(PARAM) && sym.owner.isConstructor)
- newTyper(context.constructorContext)
+ newTyper(context.makeConstructorContext)
else this;
var tpt1 = checkNoEscaping.privates(sym, typer1.typedType(vdef.tpt));
checkNonCyclic(vdef.pos, tpt1.tpe, sym);
@@ -676,7 +676,8 @@ import collection.mutable.HashMap;
val result = ddef.rhs match {
case Block(stat :: stats, expr) =>
val stat1 = typedSuperCall(stat);
- typed(copy.Block(ddef.rhs, stats, expr), UnitClass.tpe) match {
+ newTyper(context.makeConstructorSuffixContext).typed(
+ copy.Block(ddef.rhs, stats, expr), UnitClass.tpe) match {
case block1 @ Block(stats1, expr1) =>
copy.Block(block1, stat1 :: stats1, expr1)
}
@@ -840,7 +841,7 @@ import collection.mutable.HashMap;
}
def typedArg(arg: Tree, pt: Type): Tree = {
- val argTyper = if ((mode & INCONSTRmode) != 0) newTyper(context.constructorContext)
+ val argTyper = if ((mode & INCONSTRmode) != 0) newTyper(context.makeConstructorContext)
else this;
argTyper.typed(arg, mode & stickyModes, pt)
}