diff options
author | Paul Phillips <paulp@improving.org> | 2012-05-10 17:04:41 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-05-10 17:04:41 -0700 |
commit | 2c64dc3b5fb37d540a8e06e3e40075e99d053c0d (patch) | |
tree | 982b8fccccceb5dfdc76fb74731f4b181dde1df9 | |
parent | 4c04213b991596aa73dec3aa34cb8816a277f538 (diff) | |
parent | 9d1bc68b78a76a18777a859816bcb1c7f81bf2dd (diff) | |
download | scala-2c64dc3b5fb37d540a8e06e3e40075e99d053c0d.tar.gz scala-2c64dc3b5fb37d540a8e06e3e40075e99d053c0d.tar.bz2 scala-2c64dc3b5fb37d540a8e06e3e40075e99d053c0d.zip |
Merge commit 'refs/pull/526/head' into develop
-rw-r--r-- | src/compiler/scala/tools/nsc/interactive/Global.scala | 2 | ||||
-rw-r--r-- | test/files/presentation/t5708.check | 47 | ||||
-rw-r--r-- | test/files/presentation/t5708/Test.scala (renamed from test/pending/presentation/t5708/Test.scala) | 0 | ||||
-rw-r--r-- | test/files/presentation/t5708/src/Completions.scala | 18 | ||||
-rw-r--r-- | test/pending/presentation/t5708.check | 81 | ||||
-rw-r--r-- | test/pending/presentation/t5708/src/Completions.scala | 11 |
6 files changed, 66 insertions, 93 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index cf80570563..edf0108e58 100644 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -930,7 +930,7 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "") val implicitlyAdded = viaView != NoSymbol members.add(sym, pre, implicitlyAdded) { (s, st) => new TypeMember(s, st, - context.isAccessible(s, pre, superAccess && !implicitlyAdded), + context.isAccessible(if (s.hasGetter) s.getter(s.owner) else s, pre, superAccess && !implicitlyAdded), inherited, viaView) } diff --git a/test/files/presentation/t5708.check b/test/files/presentation/t5708.check new file mode 100644 index 0000000000..c6d4762635 --- /dev/null +++ b/test/files/presentation/t5708.check @@ -0,0 +1,47 @@ +reload: Completions.scala + +askTypeCompletion at Completions.scala(17,9) +================================================================================ +[response] aksTypeCompletion at (17,9) +retrieved 44 members +[accessible: true] `lazy value fooInt` +[accessible: true] `method !=(x$1: Any)Boolean` +[accessible: true] `method !=(x$1: AnyRef)Boolean` +[accessible: true] `method ##()Int` +[accessible: true] `method +(other: String)String` +[accessible: true] `method ->[B](y: B)(test.Compat.type, B)` +[accessible: true] `method ==(x$1: Any)Boolean` +[accessible: true] `method ==(x$1: AnyRef)Boolean` +[accessible: true] `method asInstanceOf[T0]=> T0` +[accessible: true] `method ensuring(cond: Boolean)test.Compat.type` +[accessible: true] `method ensuring(cond: Boolean, msg: => Any)test.Compat.type` +[accessible: true] `method ensuring(cond: test.Compat.type => Boolean)test.Compat.type` +[accessible: true] `method ensuring(cond: test.Compat.type => Boolean, msg: => Any)test.Compat.type` +[accessible: true] `method eq(x$1: AnyRef)Boolean` +[accessible: true] `method equals(x$1: Any)Boolean` +[accessible: true] `method formatted(fmtstr: String)String` +[accessible: true] `method hashCode()Int` +[accessible: true] `method isInstanceOf[T0]=> Boolean` +[accessible: true] `method ne(x$1: AnyRef)Boolean` +[accessible: true] `method notify()Unit` +[accessible: true] `method notifyAll()Unit` +[accessible: true] `method pkgPrivateM=> String` +[accessible: true] `method synchronized[T0](x$1: T0)T0` +[accessible: true] `method toString()String` +[accessible: true] `method wait()Unit` +[accessible: true] `method wait(x$1: Long)Unit` +[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` +[accessible: true] `method x=> test.Compat.type` +[accessible: true] `method →[B](y: B)(test.Compat.type, B)` +[accessible: true] `value CONST_STRINGString("constant")` +[accessible: true] `value __leftOfArrowtest.Compat.type` +[accessible: true] `value __resultOfEnsuringtest.Compat.type` +[accessible: true] `value pkgPrivateVString` +[accessible: true] `value selfAny` +[accessible: false] `method clone()Object` +[accessible: false] `method finalize()Unit` +[accessible: false] `method privateM=> String` +[accessible: false] `method protectedValM=> String` +[accessible: false] `value privateVString` +[accessible: false] `value protectedVString` +================================================================================ diff --git a/test/pending/presentation/t5708/Test.scala b/test/files/presentation/t5708/Test.scala index 96e758d974..96e758d974 100644 --- a/test/pending/presentation/t5708/Test.scala +++ b/test/files/presentation/t5708/Test.scala diff --git a/test/files/presentation/t5708/src/Completions.scala b/test/files/presentation/t5708/src/Completions.scala new file mode 100644 index 0000000000..1e9e5d5eb1 --- /dev/null +++ b/test/files/presentation/t5708/src/Completions.scala @@ -0,0 +1,18 @@ +package test + +object Compat { + final val CONST_STRING = "constant" + lazy val foo = 4 + + private val privateV = "" + private[test] val pkgPrivateV = "" + protected val protectedV = "" + + private def privateM = "" + private[test] def pkgPrivateM = "" + protected def protectedValM = "" +} + +class Foo { + Compat./*!*/CONST_STRING // its 'accessible' flag is false +} diff --git a/test/pending/presentation/t5708.check b/test/pending/presentation/t5708.check deleted file mode 100644 index 9d944d6cfc..0000000000 --- a/test/pending/presentation/t5708.check +++ /dev/null @@ -1,81 +0,0 @@ -reload: Completions.scala - -askTypeCompletion at Completions.scala(9,9) -================================================================================ -[response] aksTypeCompletion at (9,9) -retrieved 38 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(test.Compat.type, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method ensuring(cond: Boolean)test.Compat.type` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)test.Compat.type` -[accessible: true] `method ensuring(cond: test.Compat.type => Boolean)test.Compat.type` -[accessible: true] `method ensuring(cond: test.Compat.type => Boolean, msg: => Any)test.Compat.type` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> test.Compat.type` -[accessible: true] `method →[B](y: B)(test.Compat.type, B)` -[accessible: true] `lazy value fooInt` -[accessible: false] `method clone()Object` -[accessible: false] `method finalize()Unit` -[accessible: true] `value CONST_STRINGString("constant")` -[accessible: false] `value __leftOfArrowtest.Compat.type` -[accessible: false] `value __resultOfEnsuringtest.Compat.type` -[accessible: false] `value selfAny` -================================================================================ - -askTypeCompletion at Completions.scala(10,9) -================================================================================ -[response] aksTypeCompletion at (10,9) -retrieved 38 members -[accessible: true] `method !=(x$1: Any)Boolean` -[accessible: true] `method !=(x$1: AnyRef)Boolean` -[accessible: true] `method ##()Int` -[accessible: true] `method +(other: String)String` -[accessible: true] `method ->[B](y: B)(test.Compat.type, B)` -[accessible: true] `method ==(x$1: Any)Boolean` -[accessible: true] `method ==(x$1: AnyRef)Boolean` -[accessible: true] `method asInstanceOf[T0]=> T0` -[accessible: true] `method ensuring(cond: Boolean)test.Compat.type` -[accessible: true] `method ensuring(cond: Boolean, msg: => Any)test.Compat.type` -[accessible: true] `method ensuring(cond: test.Compat.type => Boolean)test.Compat.type` -[accessible: true] `method ensuring(cond: test.Compat.type => Boolean, msg: => Any)test.Compat.type` -[accessible: true] `method eq(x$1: AnyRef)Boolean` -[accessible: true] `method equals(x$1: Any)Boolean` -[accessible: true] `method formatted(fmtstr: String)String` -[accessible: true] `method hashCode()Int` -[accessible: true] `method isInstanceOf[T0]=> Boolean` -[accessible: true] `method ne(x$1: AnyRef)Boolean` -[accessible: true] `method notify()Unit` -[accessible: true] `method notifyAll()Unit` -[accessible: true] `method synchronized[T0](x$1: T0)T0` -[accessible: true] `method toString()String` -[accessible: true] `method wait()Unit` -[accessible: true] `method wait(x$1: Long)Unit` -[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` -[accessible: true] `method x=> test.Compat.type` -[accessible: true] `method →[B](y: B)(test.Compat.type, B)` -[accessible: true] `lazy value fooInt` -[accessible: false] `method clone()Object` -[accessible: false] `method finalize()Unit` -[accessible: true] `value CONST_STRINGString("constant")` -[accessible: false] `value __leftOfArrowtest.Compat.type` -[accessible: false] `value __resultOfEnsuringtest.Compat.type` -[accessible: false] `value selfAny` -================================================================================ diff --git a/test/pending/presentation/t5708/src/Completions.scala b/test/pending/presentation/t5708/src/Completions.scala deleted file mode 100644 index cc41492df7..0000000000 --- a/test/pending/presentation/t5708/src/Completions.scala +++ /dev/null @@ -1,11 +0,0 @@ -package test - -object Compat { - final val CONST_STRING = "constant" - lazy val foo = 4 -} - -class Foo { - Compat./*!*/CONST_STRING // its 'accessible' flag is false - Compat./*!*/foo // its 'accessible' flag is false -} |