diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 7 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 2 | ||||
-rw-r--r-- | test/files/buildmanager/t3133/A.java | 7 | ||||
-rw-r--r-- | test/files/buildmanager/t3133/t3133.check | 3 | ||||
-rw-r--r-- | test/files/buildmanager/t3133/t3133.test | 1 |
5 files changed, 12 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"); diff --git a/test/files/buildmanager/t3133/A.java b/test/files/buildmanager/t3133/A.java new file mode 100644 index 0000000000..9cf4d96bd4 --- /dev/null +++ b/test/files/buildmanager/t3133/A.java @@ -0,0 +1,7 @@ +public class A { + class Foo {} + + public A(Foo a) {} + + private void bar(Foo z) {} +} diff --git a/test/files/buildmanager/t3133/t3133.check b/test/files/buildmanager/t3133/t3133.check new file mode 100644 index 0000000000..5e4e71e045 --- /dev/null +++ b/test/files/buildmanager/t3133/t3133.check @@ -0,0 +1,3 @@ +builder > A.java +compiling Set(A.java) +Changes: Map() diff --git a/test/files/buildmanager/t3133/t3133.test b/test/files/buildmanager/t3133/t3133.test new file mode 100644 index 0000000000..6cf7e35543 --- /dev/null +++ b/test/files/buildmanager/t3133/t3133.test @@ -0,0 +1 @@ +>>compile A.java |