aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t5259.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t5259.scala')
-rw-r--r--tests/untried/pos/t5259.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/untried/pos/t5259.scala b/tests/untried/pos/t5259.scala
new file mode 100644
index 000000000..40c508f7d
--- /dev/null
+++ b/tests/untried/pos/t5259.scala
@@ -0,0 +1,21 @@
+class A[T]
+class B {
+ def m(a: A[this.type] = new A[this.type]): Unit = { }
+}
+
+class C {
+ def foo(a: Int, b: Int = 0) = 0
+ def foo() = 0
+}
+
+object Test {
+ def newB = new B
+ newB.m()
+
+ val stableB = new B
+ stableB.m()
+
+ def f: Unit = {
+ println((new C).foo(0))
+ }
+}