summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-19 19:55:59 +0000
committerPaul Phillips <paulp@improving.org>2011-03-19 19:55:59 +0000
commitb503ea139abfd76218d4025f7a84b6202ca354c7 (patch)
treecbe5b5a27d4685a204da5ebb13ae3a50cc1c2bf4 /src
parentaa0cc8e415cca88285b36e76842b759c59f66be7 (diff)
downloadscala-b503ea139abfd76218d4025f7a84b6202ca354c7.tar.gz
scala-b503ea139abfd76218d4025f7a84b6202ca354c7.tar.bz2
scala-b503ea139abfd76218d4025f7a84b6202ca354c7.zip
I'm going to assume the patch I dropped off fiv...
I'm going to assume the patch I dropped off five months ago for #3938 was merely overlooked. Fixes an issue with java types which extend inner classes. Closes #3938, review by odersky.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 7ba561136d..fb8b0058eb 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -4267,7 +4267,7 @@ trait Typers extends Modes {
val result = typed(tree, forTypeMode(mode) | FUNmode, WildcardType)
val restpe = result.tpe.normalize // normalize to get rid of type aliases for the following check (#1241)
- if (!phase.erasedTypes && restpe.isInstanceOf[TypeRef] && !restpe.prefix.isStable) {
+ if (!phase.erasedTypes && restpe.isInstanceOf[TypeRef] && !restpe.prefix.isStable && !context.unit.isJava) {
error(tree.pos, restpe.prefix+" is not a legal prefix for a constructor")
}