Closes #3118. review by extempore

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@21064 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
odersky 2010-03-04 14:06:18 +00:00
parent 5734a17735
commit 3c2a34e8c7
3 changed files with 16 additions and 1 deletions

View File

@ -53,7 +53,7 @@ object Flags extends reflect.generic.Flags {
final val FieldFlags: Long =
MUTABLE | CASEACCESSOR | PARAMACCESSOR | STATIC | FINAL | PRESUPER | LAZY
final val AccessFlags: Long = PRIVATE | PROTECTED
final val AccessFlags: Long = PRIVATE | PROTECTED | LOCAL
final val VARIANCES = COVARIANT | CONTRAVARIANT
final val ConstrFlags: Long = JAVA

View File

@ -0,0 +1,7 @@
t3118.scala:6: error: value C is not a member of O1
println(x.C()) // should not be accessible
^
t3118.scala:7: error: type C is not a member of O1
println(new x.C) // is correctly not accessible
^
two errors found

View File

@ -0,0 +1,8 @@
class O1 {
private[this] case class C()
val x = new O1
println(x.C()) // should not be accessible
println(new x.C) // is correctly not accessible
}