Commit 66780fd
authored
Improve
If a MethodError arises on a anonyomous function, the words "anonymous
function" are printed in the error like so:
```julia
g=(x,y)->x+y
g(1,2,3)
```
```
ERROR: MethodError: no method of the anonymous function var"mmtk#5#6" matching (::var"mmtk#5#6")(::Int64, ::Int64, ::Int64)
The function `mmtk#5` exists, but no method is defined for this combination of argument types.
Closest candidates are:
(::var"mmtk#5#6")(::Any, ::Any)
@ Main REPL[4]:1
```
See the [original pull
request](JuliaLang#57319) and
[issue](JuliaLang#56325) JuliaLang#56325MethodError message for anonymous functions (JuliaLang#57340)1 parent 4c9bede commit 66780fd
2 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
350 | 352 | | |
351 | 353 | | |
352 | 354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1262 | 1262 | | |
1263 | 1263 | | |
1264 | 1264 | | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
0 commit comments