summaryrefslogtreecommitdiff
path: root/test/files/neg/protected-constructors.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/protected-constructors.scala')
-rw-r--r--test/files/neg/protected-constructors.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/files/neg/protected-constructors.scala b/test/files/neg/protected-constructors.scala
new file mode 100644
index 0000000000..2838caf09c
--- /dev/null
+++ b/test/files/neg/protected-constructors.scala
@@ -0,0 +1,21 @@
+package dingus {
+ class Foo1() { protected def this(name: String) = this() }
+ class Foo2 protected (name: String) { }
+ object Ding {
+ protected class Foo3(name: String) { }
+ }
+}
+
+package hungus {
+ import dingus._
+
+ object P {
+ class Bar1 extends Foo1("abc")
+ class Bar2 extends Foo2("abc")
+ class Bar3 extends Ding.Foo3("abc")
+
+ val foo1 = new Foo1("abc")
+ val foo2 = new Foo2("abc")
+ val foo3 = new Ding.Foo3("abc")
+ }
+}