summaryrefslogtreecommitdiff
path: root/test/files/neg/t3871b.check
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-10-09 16:56:12 +0200
committerJason Zaugg <jzaugg@gmail.com>2013-10-23 14:38:47 +0200
commitb39a509213f7b43185cca3e633c9211abdc0f126 (patch)
treeaa4c4afd813a734c4a5abe78ee587dd11125d23b /test/files/neg/t3871b.check
parent4d9631449fdf960c1bc56ac8ad43e3334c54f180 (diff)
downloadscala-b39a509213f7b43185cca3e633c9211abdc0f126.tar.gz
scala-b39a509213f7b43185cca3e633c9211abdc0f126.tar.bz2
scala-b39a509213f7b43185cca3e633c9211abdc0f126.zip
SI-3871 Testing protected access against the spec
I've marked a few minor cases in the test with !!! where I believe the behaviour goes beyond the spec.
Diffstat (limited to 'test/files/neg/t3871b.check')
-rw-r--r--test/files/neg/t3871b.check97
1 files changed, 97 insertions, 0 deletions
diff --git a/test/files/neg/t3871b.check b/test/files/neg/t3871b.check
new file mode 100644
index 0000000000..6ab5ddfaf1
--- /dev/null
+++ b/test/files/neg/t3871b.check
@@ -0,0 +1,97 @@
+t3871b.scala:61: error: not found: value protOT
+ protOT // not allowed
+ ^
+t3871b.scala:77: error: method prot in class A cannot be accessed in E.this.A
+ Access to protected method prot not permitted because
+ prefix type E.this.A does not conform to
+ class B in class E where the access take place
+ a.prot // not allowed, prefix type `A` does not conform to `B`
+ ^
+t3871b.scala:79: error: value protT is not a member of E.this.B
+ b.protT // not allowed
+ ^
+t3871b.scala:80: error: value protT is not a member of E.this.C
+ c.protT // not allowed
+ ^
+t3871b.scala:81: error: value protT is not a member of E.this.A
+ a.protT // not allowed
+ ^
+t3871b.scala:91: error: method prot in class A cannot be accessed in E.this.A
+ Access to protected method prot not permitted because
+ prefix type E.this.A does not conform to
+ object B in class E where the access take place
+ a.prot // not allowed
+ ^
+t3871b.scala:93: error: value protT is not a member of E.this.B
+ b.protT // not allowed
+ ^
+t3871b.scala:94: error: value protT is not a member of E.this.C
+ c.protT // not allowed
+ ^
+t3871b.scala:95: error: value protT is not a member of E.this.A
+ a.protT // not allowed
+ ^
+t3871b.scala:102: error: method prot in class A cannot be accessed in E.this.B
+ Access to protected method prot not permitted because
+ enclosing class Z in class E is not a subclass of
+ class A in class E where target is defined
+ b.prot // not allowed
+ ^
+t3871b.scala:103: error: method prot in class A cannot be accessed in E.this.C
+ Access to protected method prot not permitted because
+ enclosing class Z in class E is not a subclass of
+ class A in class E where target is defined
+ c.prot // not allowed
+ ^
+t3871b.scala:104: error: method prot in class A cannot be accessed in E.this.A
+ Access to protected method prot not permitted because
+ enclosing class Z in class E is not a subclass of
+ class A in class E where target is defined
+ a.prot // not allowed
+ ^
+t3871b.scala:109: error: value protT is not a member of E.this.B
+ b.protT // not allowed
+ ^
+t3871b.scala:110: error: value protT is not a member of E.this.C
+ c.protT // not allowed
+ ^
+t3871b.scala:111: error: value protT is not a member of E.this.A
+ a.protT // not allowed
+ ^
+t3871b.scala:120: error: method prot in class A cannot be accessed in Other.this.e.B
+ Access to protected method prot not permitted because
+ enclosing class Other is not a subclass of
+ class A in class E where target is defined
+ b.prot // not allowed
+ ^
+t3871b.scala:121: error: method prot in class A cannot be accessed in Other.this.e.C
+ Access to protected method prot not permitted because
+ enclosing class Other is not a subclass of
+ class A in class E where target is defined
+ c.prot // not allowed
+ ^
+t3871b.scala:122: error: method prot in class A cannot be accessed in Other.this.e.A
+ Access to protected method prot not permitted because
+ enclosing class Other is not a subclass of
+ class A in class E where target is defined
+ a.prot // not allowed
+ ^
+t3871b.scala:123: error: method protE in class A cannot be accessed in Other.this.e.B
+ Access to protected method protE not permitted because
+ enclosing class Other is not a subclass of
+ class A in class E where target is defined
+ b.protE // not allowed
+ ^
+t3871b.scala:124: error: method protE in class A cannot be accessed in Other.this.e.A
+ Access to protected method protE not permitted because
+ enclosing class Other is not a subclass of
+ class A in class E where target is defined
+ a.protE // not allowed
+ ^
+t3871b.scala:125: error: method protE in class A cannot be accessed in Other.this.e.C
+ Access to protected method protE not permitted because
+ enclosing class Other is not a subclass of
+ class A in class E where target is defined
+ c.protE // not allowed
+ ^
+21 errors found