summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-02-21 15:04:28 +0100
committerJason Zaugg <jzaugg@gmail.com>2014-02-21 15:04:28 +0100
commit00624a39ed84c3fd245dd9df7454d4cec4399e13 (patch)
treeb990aef26c54e0ecd5a8be17492e40409d0f3226 /test/files
parentd128f624bc4cf22dc0e277706690e98ed6f084b6 (diff)
parentd5bb19f0f9bb43150feb645cd43e161ded4cccab (diff)
downloadscala-00624a39ed84c3fd245dd9df7454d4cec4399e13.tar.gz
scala-00624a39ed84c3fd245dd9df7454d4cec4399e13.tar.bz2
scala-00624a39ed84c3fd245dd9df7454d4cec4399e13.zip
Merge pull request #3562 from adriaanm/t8197
SI-8197 Overload resolution should not consider default arguments
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/t8197.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/run/t8197.scala b/test/files/run/t8197.scala
new file mode 100644
index 0000000000..5ca67088de
--- /dev/null
+++ b/test/files/run/t8197.scala
@@ -0,0 +1,13 @@
+// NOTE: according to SI-4728, this shouldn't even compile...
+class A
+class B
+// default arguments do not participate in overload resolution
+class Foo(val x: A = null) {
+ def this(bla: B*) {
+ this(new A)
+ }
+}
+
+object Test extends App {
+ assert((new Foo).x != null)
+}