From ca05d22006dd528eae26c8ab4d6ca0a4f27fb69f Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Fri, 17 Jan 2014 16:37:24 +0100 Subject: SI-8157 Make overloading, defaults restriction PolyType aware Named/Default args levies an implementation restriction that only one overloaded alternative may declare defaults. But, this restriction failed to consider polymorphic methods. Rather than matching on MethodType, this commit uses `Type#paramms`, which handles PolyTypes and curried MethodTypes in one fell swoop. --- test/files/neg/t8157.scala | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 test/files/neg/t8157.scala (limited to 'test/files/neg/t8157.scala') diff --git a/test/files/neg/t8157.scala b/test/files/neg/t8157.scala new file mode 100644 index 0000000000..462d4fa3f1 --- /dev/null +++ b/test/files/neg/t8157.scala @@ -0,0 +1,4 @@ +object Test { + def foo(printer: Any, question: => String, show: Boolean = false)(op: => Any): Any = ??? + def foo[T](question: => String, show: Boolean)(op: => Any = ()): Any = ??? +} -- cgit v1.2.3