Commit 7ea2c28
authored
Julia allows following method definitions, but LoweredCodeUtils
(and thus Revise) can't handle them well, and it lead to the issue
<timholy/Revise.jl#643>:
```julia
function foogr end
macro deffoogr()
gr = GlobalRef(__module__, :foogr) # will be lowered to `GlobalRef`
quote
$gr(args...) = length(args)
end
end
@deffoogr
@show foogr(1,2,3) # => 3
function fooqn end
macro deffooqn()
sig = :($(GlobalRef(__module__, :fooqn))(args...)) # will be lowered to `QuoteNode`
return Expr(:function, sig, Expr(:block, __source__, :(length(args))))
end
@deffooqn
@show fooqn(1,2,3) # => 3
```
---
fixes timholy/Revise.jl#643
1 parent 4612349 commit 7ea2c28
2 files changed
+59
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| |||
161 | 164 | | |
162 | 165 | | |
163 | 166 | | |
| 167 | + | |
| 168 | + | |
164 | 169 | | |
165 | 170 | | |
166 | 171 | | |
| |||
208 | 213 | | |
209 | 214 | | |
210 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
211 | 228 | | |
212 | 229 | | |
213 | 230 | | |
| |||
469 | 486 | | |
470 | 487 | | |
471 | 488 | | |
| 489 | + | |
472 | 490 | | |
473 | 491 | | |
| 492 | + | |
| 493 | + | |
474 | 494 | | |
475 | 495 | | |
476 | 496 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
0 commit comments