You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
+2-10Lines changed: 2 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -622,16 +622,8 @@ trait ContextErrors {
622
622
case (c @Literal(Constant(()))) ::Nilif c.hasAttachment[SyntheticUnitAttachment.type] =>
623
623
s"can't supply unit value with infix notation because nullary $target takes no arguments; use dotted invocation instead: ${show(treeCopy.Apply(tree, fun, Nil))}"
624
624
case _ =>s"no arguments allowed for nullary $target"
625
-
}
626
-
elseif (excess <3&& expected <=5) s"too many arguments ($supplied) for $target"
627
-
elseif (expected >10) s"$supplied arguments but expected $expected for $target"
628
-
else {
629
-
valmore=
630
-
if (excess ==1) "one more argument"
631
-
elseif (excess >0) s"$excess more arguments"
632
-
else"too many arguments"
633
-
s"$more than can be applied to $target"
634
-
}
625
+
} else
626
+
s"too many arguments ($supplied, expected $expected) for $target"
635
627
}
636
628
valunknowns= (namelessArgs zip args) collect {
637
629
case (_: Assign, NamedArg(Ident(name), _)) => name
t8667.scala:42: error: can't supply unit value with infix notation because nullary method f0: (): Int takes no arguments; use dotted invocation instead: x.f0()
0 commit comments