diff options
author | Som Snytt <som.snytt@gmail.com> | 2015-06-26 21:32:29 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2015-06-27 01:55:45 -0700 |
commit | 96b012aa48e3d91f8ec6d5221df2f455f278c9e0 (patch) | |
tree | e78a49eeeb01ca4a516385d316062b6b83358ee3 /test/files/presentation/t4287 | |
parent | 5b8073676cc77c2c889ed690f12bb6a99e790769 (diff) | |
download | scala-96b012aa48e3d91f8ec6d5221df2f455f278c9e0.tar.gz scala-96b012aa48e3d91f8ec6d5221df2f455f278c9e0.tar.bz2 scala-96b012aa48e3d91f8ec6d5221df2f455f278c9e0.zip |
Improved message for missing argument list
Clarifies the language and rules for eta-expansion.
A missing argument in a list, as opposed to a missing
argument list, results in a different message.
The comical expansion in parens does not attempt to show
what was already applied, but succeeds in showing at a
glance the shape of the method in question.
```
scala> def m(i: Int, j: Int)(x: Int) = ???
m: (i: Int, j: Int)(x: Int)Nothing
scala> m
<console>:12: error: missing argument list for method m
Unapplied methods are only converted to functions when a function type is expected.
You can make this conversion explicit by writing `m _` or `m(_,_)(_)` instead of `m`.
m
^
```
The original submission was due to sschaef and the wording due
to adriaanm, with a minor tweak.
Diffstat (limited to 'test/files/presentation/t4287')
0 files changed, 0 insertions, 0 deletions