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: _tour/default-parameter-values.md
+25Lines changed: 25 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -62,3 +62,28 @@ public class Main {
62
62
```
63
63
{% endtab %}
64
64
{% endtabs %}
65
+
66
+
### Default Parameters for Overloaded Methods
67
+
68
+
Scala doesn't allow having two methods with default parameters and with the same name (overloaded).
69
+
An important reason why is to avoid the ambiguity that can be caused due to the existence of default parameters. To illustrate the problem, let's consider the method declarations provided below:
0 commit comments