aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/accesses2.check
diff options
context:
space:
mode:
authorSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-12 22:44:33 +0100
committerSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-12 22:44:33 +0100
commit9ef5f6817688f814a3450126aa7383b0928e80a0 (patch)
tree5727a2f7f7fd665cefdb312af2785c692f04377c /tests/untried/neg/accesses2.check
parent194be919664447631ba55446eb4874979c908d27 (diff)
downloaddotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.gz
dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.bz2
dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.zip
add tests from scala/test/files/{pos,neg}
with explicit Unit return type
Diffstat (limited to 'tests/untried/neg/accesses2.check')
-rw-r--r--tests/untried/neg/accesses2.check12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/untried/neg/accesses2.check b/tests/untried/neg/accesses2.check
new file mode 100644
index 000000000..66cf9a116
--- /dev/null
+++ b/tests/untried/neg/accesses2.check
@@ -0,0 +1,12 @@
+accesses2.scala:6: error: overriding method f2 in class A of type ()Int;
+ method f2 has weaker access privileges; it should not be private
+ private def f2(): Int = 1
+ ^
+accesses2.scala:5: error: class B1 needs to be abstract, since method f2 in class A of type ()Int is not defined
+ class B1 extends A {
+ ^
+accesses2.scala:9: error: overriding method f2 in class A of type ()Int;
+ method f2 has weaker access privileges; it should not be private
+ private def f2(): Int = 1
+ ^
+three errors found