diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t8197.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/files/run/t8197.scala b/test/files/run/t8197.scala index 5ca67088de..910a3ebc83 100644 --- a/test/files/run/t8197.scala +++ b/test/files/run/t8197.scala @@ -1,7 +1,7 @@ -// NOTE: according to SI-4728, this shouldn't even compile... +// SI-8197, see also SI-4592 and SI-4728 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) @@ -9,5 +9,8 @@ class Foo(val x: A = null) { } object Test extends App { + // both constructors of `Foo` are applicable. Overloading resolution + // will eliminate the alternative that uses a default argument, therefore + // the vararg constructor is chosen. assert((new Foo).x != null) } |