diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala | 2 | ||||
-rw-r--r-- | test/files/pos/bug1385.scala | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala index a2f72cf861..6ea1a2eb69 100644 --- a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala +++ b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala @@ -47,7 +47,7 @@ trait SyntheticMethods { self: Analyzer => val localTyper = newTyper(localContext) def hasImplementation(name: Name): Boolean = if (inIDE) true else { - val sym = clazz.info.nonPrivateMember(name) + val sym = clazz.info.member(name) // member and not nonPrivateMember: bug #1385 sym.isTerm && !(sym hasFlag DEFERRED) } diff --git a/test/files/pos/bug1385.scala b/test/files/pos/bug1385.scala new file mode 100644 index 0000000000..ec3efbbab6 --- /dev/null +++ b/test/files/pos/bug1385.scala @@ -0,0 +1,3 @@ +@serializable object Test { + private def readResolve:AnyRef = this +}
\ No newline at end of file |