summaryrefslogtreecommitdiff
path: root/src/interactive
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-12-11 19:42:33 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-12-11 19:42:33 +0100
commite1c6dd965aa4249f715bbb2832df182cc5505853 (patch)
tree840a092abc16563b9f83b6b3a24556ad91ba67e7 /src/interactive
parent18fd31d2b58e6e14cbd49d8e20ba05d05165eb4b (diff)
parent0c927046dc5df974e6c39187107cf3548825282b (diff)
downloadscala-e1c6dd965aa4249f715bbb2832df182cc5505853.tar.gz
scala-e1c6dd965aa4249f715bbb2832df182cc5505853.tar.bz2
scala-e1c6dd965aa4249f715bbb2832df182cc5505853.zip
Merge commit '0c92704' into merge/2.10.x-to-master
Conflicts: bincompat-forward.whitelist.conf src/interactive/scala/tools/nsc/interactive/Global.scala test/files/presentation/scope-completion-2.check test/files/presentation/scope-completion-3.check test/files/presentation/scope-completion-import.check Conflicts in the scope completion tests handled with the help of @skyluc in https://github.com/scala/scala/pull/3264
Diffstat (limited to 'src/interactive')
-rw-r--r--src/interactive/scala/tools/nsc/interactive/Global.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interactive/scala/tools/nsc/interactive/Global.scala b/src/interactive/scala/tools/nsc/interactive/Global.scala
index 467a210cab..92c69dfcde 100644
--- a/src/interactive/scala/tools/nsc/interactive/Global.scala
+++ b/src/interactive/scala/tools/nsc/interactive/Global.scala
@@ -1018,7 +1018,11 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "")
val enclosing = new Members[ScopeMember]
def addScopeMember(sym: Symbol, pre: Type, viaImport: Tree) =
locals.add(sym, pre, implicitlyAdded = false) { (s, st) =>
- new ScopeMember(s, st, context.isAccessible(s, pre, superAccess = false), viaImport)
+ // imported val and var are always marked as inaccessible, but they could be accessed through their getters. SI-7995
+ if (s.hasGetter)
+ new ScopeMember(s, st, context.isAccessible(s.getter, pre, superAccess = false), viaImport)
+ else
+ new ScopeMember(s, st, context.isAccessible(s, pre, superAccess = false), viaImport)
}
def localsToEnclosing() = {
enclosing.addNonShadowed(locals)