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:
parent
5734a17735
commit
3c2a34e8c7
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue