From a6d5eb507bbeac2055a224a15fd76e7f9425520b Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Wed, 4 May 2016 15:52:01 -0700 Subject: SI-8667 Improve too-many-args message Use removeNames to help diagnose the application. Supplement the error message with how many extra args and any other residual assignments that the user might have thought was a properly named arg. The error message is gradual: succinct for short arg lists, more verbose for longer applications. Very long arg lists are probably generated, so that message is the least colloquial. --- test/files/neg/protected-constructors.check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/files/neg/protected-constructors.check') diff --git a/test/files/neg/protected-constructors.check b/test/files/neg/protected-constructors.check index f44d7db9b9..5c880cb672 100644 --- a/test/files/neg/protected-constructors.check +++ b/test/files/neg/protected-constructors.check @@ -1,4 +1,4 @@ -protected-constructors.scala:17: error: too many arguments for constructor Foo1: ()dingus.Foo1 +protected-constructors.scala:17: error: no arguments allowed for nullary constructor Foo1: ()dingus.Foo1 val foo1 = new Foo1("abc") ^ protected-constructors.scala:18: error: constructor Foo2 in class Foo2 cannot be accessed in object P -- cgit v1.2.3