Open
Description
When defining a functor in julia version 1.12, I get an error (depending on the formatting), while 1.11 and 1.10 work fine. MWE:
julia> function (
a::Tuple{A}
)() where {A<:Int64} end
ERROR: UndefVarError: `A` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
[1] top-level scope
@ REPL[1]:1
Putting it in one line works like normal, even with spaces. Just the newlines seem to break it.
julia> function (a::Tuple{A})() where {A<:Int64} end
julia> function ( a::Tuple{A} )() where {A<:Int64} end
1.12 versioninfo()
:
julia> versioninfo()
Julia Version 1.12.0-beta1
Commit c175ace780d (2025-04-02 11:19 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 24 × AMD Ryzen 9 7900X3D 12-Core Processor
WORD_SIZE: 64
LLVM: libLLVM-18.1.7 (ORCJIT, znver4)
GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 24 virtual cores)