https://github.com/JuliaLang/julia
Revision 136f018e7473e48ebb90ed5bc8dc6ad3dd109d6f authored by Keno Fischer on 01 March 2024, 06:32:36 UTC, committed by GitHub on 01 March 2024, 06:32:36 UTC
The following is currently an error:
```
julia> module MyMacroModule
           macro mymacro end
       end
Main.MyMacroModule

julia> macro MyMacroModule.mymacro()
           1
       end
ERROR: syntax: invalid macro definition around REPL[2]:1
Stacktrace:
 [1] top-level scope
   @ REPL[2]:1
```

Discussing with Jeff, we didn't think there was any good reason not to
allow this, just a missing case in lowering. It's probably not
particularly useful (unlike the corresponding case for functions that is
used all the time), but it came up in writing a test case for #53515.
1 parent 95f54c4
History
Tip revision: 136f018e7473e48ebb90ed5bc8dc6ad3dd109d6f authored by Keno Fischer on 01 March 2024, 06:32:36 UTC
Allow GlobalRef and module qualified names in macro definitions (#53535)
Tip revision: 136f018
File Mode Size
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.buildkite-external-version -rw-r--r-- 5 bytes
.clang-format -rw-r--r-- 3.3 KB
.clangd -rw-r--r-- 114 bytes
.codecov.yml -rw-r--r-- 52 bytes
.git-blame-ignore-revs -rw-r--r-- 371 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 571 bytes
.mailmap -rw-r--r-- 12.7 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 940 bytes
CONTRIBUTING.md -rw-r--r-- 23.4 KB
HISTORY.md -rw-r--r-- 388.3 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 56.1 KB
Makefile -rw-r--r-- 30.2 KB
NEWS.md -rw-r--r-- 2.2 KB
README.md -rw-r--r-- 7.4 KB
THIRDPARTY.md -rw-r--r-- 3.9 KB
VERSION -rw-r--r-- 11 bytes
julia.spdx.json -rw-r--r-- 37.8 KB
pkgimage.mk -rw-r--r-- 7.1 KB
sysimage.mk -rw-r--r-- 4.2 KB
typos.toml -rw-r--r-- 78 bytes

README.md

back to top