From 17469b82ca7afc5376bc3906bb5b64d10f38a100 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 14 Feb 2017 16:38:48 +0100 Subject: Tweak printing of polymrophic methods Omit the `=>' if a PolyType has a MethodType as result type. --- tests/neg/i1747.scala | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tests/neg/i1747.scala (limited to 'tests/neg/i1747.scala') diff --git a/tests/neg/i1747.scala b/tests/neg/i1747.scala new file mode 100644 index 000000000..9675de992 --- /dev/null +++ b/tests/neg/i1747.scala @@ -0,0 +1,3 @@ +class Coll[E] extends java.util.Collection[E] { + def toArray[T](a: Array[T]): Array[T] = ??? // error: cannot override +} -- cgit v1.2.3 From aa561a034cb9205d05737a602dc2268ec798fa53 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 15 Feb 2017 14:41:02 +0100 Subject: Fix test case --- tests/neg/i1747.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/neg/i1747.scala') diff --git a/tests/neg/i1747.scala b/tests/neg/i1747.scala index 9675de992..b35e364fa 100644 --- a/tests/neg/i1747.scala +++ b/tests/neg/i1747.scala @@ -1,3 +1,3 @@ class Coll[E] extends java.util.Collection[E] { - def toArray[T](a: Array[T]): Array[T] = ??? // error: cannot override + def toArray[T](a: Array[T]): Array[T] = ??? // error: cannot override // error } -- cgit v1.2.3 From 779eaf6b9898e4ec8e2e3cdfbf0d36aeede3926e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 15 Feb 2017 16:11:20 +0100 Subject: Fix test case^2 --- tests/neg/i1747.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/neg/i1747.scala') diff --git a/tests/neg/i1747.scala b/tests/neg/i1747.scala index b35e364fa..54492aaed 100644 --- a/tests/neg/i1747.scala +++ b/tests/neg/i1747.scala @@ -1,3 +1,3 @@ -class Coll[E] extends java.util.Collection[E] { - def toArray[T](a: Array[T]): Array[T] = ??? // error: cannot override // error +class Coll[E] extends java.util.Collection[E] { // error: needs to be abstract + def toArray[T](a: Array[T]): Array[T] = ??? // error: cannot override } -- cgit v1.2.3