diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-03-17 16:02:42 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-03-17 16:02:42 +0000 |
commit | fb399bce3a4f176a3805417d645c645397f35d24 (patch) | |
tree | f55d175a8b534d8a5b14c1f43699e01bc45e4134 /src | |
parent | 9f4d2a906f12853edf8024e3487abc924046c047 (diff) | |
download | scala-fb399bce3a4f176a3805417d645c645397f35d24.tar.gz scala-fb399bce3a4f176a3805417d645c645397f35d24.tar.bz2 scala-fb399bce3a4f176a3805417d645c645397f35d24.zip |
Closes #3133. Review by community.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 7 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index e6c6d8a4a3..becb4b069f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -252,13 +252,6 @@ trait Contexts { self: Analyzer => argContext } - //todo: remove - def makeConstructorSuffixContext = { - val c = make(tree) - c.inConstructorSuffix = true - c - } - private def diagString = if (diagnostic.isEmpty) "" else diagnostic.mkString("\n","\n", "") diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index aff6aa86e6..0ddd838303 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -1159,7 +1159,7 @@ trait Namers { self: Analyzer => newNamer(context.makeNewScope(tree, sym)).methodSig(mods, tparams, vparamss, tpt, rhs) case vdef @ ValDef(mods, name, tpt, rhs) => - val typer1 = typer.constrTyperIf(sym.hasFlag(PARAM | PRESUPER) && sym.owner.isConstructor) + val typer1 = typer.constrTyperIf(sym.hasFlag(PARAM | PRESUPER) && !mods.hasFlag(JAVA) && sym.owner.isConstructor) if (tpt.isEmpty) { if (rhs.isEmpty) { context.error(tpt.pos, "missing parameter type"); |