Skip to content

Commit 7ebc9e2

Browse files
committed
Better error message constructor applications
If a constructor for class C was called with wrong number of parameters, the previous error message referred to `method <init>`. Now it is `constructor C`.
1 parent d94f0b8 commit 7ebc9e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ trait Applications extends Compatibility { self: Typer =>
192192
def success = ok
193193

194194
protected def methodType = methType.asInstanceOf[MethodType]
195-
private def methString: String = s"method ${methRef.name}: ${methType.show}"
195+
private def methString: String = i"${methRef.symbol}: ${methType.show}"
196196

197197
/** Re-order arguments to correctly align named arguments */
198198
def reorder[T >: Untyped](args: List[Trees.Tree[T]]): List[Trees.Tree[T]] = {

0 commit comments

Comments
 (0)