aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t4859.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t4859.scala')
-rw-r--r--tests/untried/pos/t4859.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/untried/pos/t4859.scala b/tests/untried/pos/t4859.scala
new file mode 100644
index 000000000..284a39b7a
--- /dev/null
+++ b/tests/untried/pos/t4859.scala
@@ -0,0 +1,17 @@
+object O {
+ // error: C is not a legal prefix for a constructor
+ C().CC()
+ // but this works.
+ D().DD()
+}
+
+case class C() {
+ case class CC()
+}
+
+case class D() {
+ class DD()
+ object DD {
+ def apply() = new DD()
+ }
+}