Revision 0f269668c468ff6a2876221cdb21dfd78defb68c authored by Keno Fischer on 15 June 2023, 06:07:56 UTC, committed by GitHub on 15 June 2023, 06:07:56 UTC
The _new_NamedTuple helper was in a Base-only branch, causing

```

julia> Core.eval(Core.Compiler, quote f(;a=1) = a end)
f (generic function with 1 method)

julia> Core.Compiler.f(;b=2)
ERROR: UndefVarError: `_new_NamedTuple` not defined
Stacktrace:
 [1] macro expansion
   @ Core.Compiler ./namedtuple.jl:0 [inlined]
 [2] structdiff(a::@NamedTuple{b::Int64}, b::Type{NamedTuple{(:a,)}})
   @ Core.Compiler ./namedtuple.jl:421
 [3] top-level scope
   @ REPL[2]:1
```

After this change, we have the expected
```
julia> Core.eval(Core.Compiler, quote f(;a=1) = a end)
f (generic function with 1 method)

julia> Core.Compiler.f(;b=2)
ERROR: MethodError: no method matching f(; b::Int64)

Closest candidates are:
  f(; a) got unsupported keyword argument "b"
   @ Core REPL[13]:1

Stacktrace:
 [1] kwerr(kw::@NamedTuple{b::Int64}, args::Function)
   @ Core.Compiler ./error.jl:165
 [2] top-level scope
   @ REPL[14]:1
```
1 parent 5db2c27
History
File Mode Size
checksums
patches
tools
valgrind
.gitignore -rw-r--r-- 26 bytes
Makefile -rw-r--r-- 5.8 KB
blastrampoline.mk -rw-r--r-- 2.1 KB
blastrampoline.version -rw-r--r-- 196 bytes
clang.version -rw-r--r-- 123 bytes
csl.mk -rw-r--r-- 4.6 KB
csl.version -rw-r--r-- 57 bytes
curl.mk -rw-r--r-- 3.4 KB
curl.version -rw-r--r-- 95 bytes
dsfmt.mk -rw-r--r-- 2.2 KB
dsfmt.version -rw-r--r-- 76 bytes
gfortblas.alias -rw-r--r-- 706 bytes
gfortblas.c -rw-r--r-- 4.4 KB
gmp.mk -rw-r--r-- 3.3 KB
gmp.version -rw-r--r-- 70 bytes
ittapi.mk -rw-r--r-- 1.6 KB
ittapi.version -rw-r--r-- 91 bytes
libgit2.mk -rw-r--r-- 3.7 KB
libgit2.version -rw-r--r-- 429 bytes
libssh2.mk -rw-r--r-- 2.9 KB
libssh2.version -rw-r--r-- 167 bytes
libsuitesparse.mk -rw-r--r-- 5.0 KB
libsuitesparse.version -rw-r--r-- 101 bytes
libtracyclient.mk -rw-r--r-- 3.4 KB
libtracyclient.version -rw-r--r-- 227 bytes
libuv.mk -rw-r--r-- 2.4 KB
libuv.version -rw-r--r-- 154 bytes
libwhich.mk -rw-r--r-- 1.2 KB
libwhich.version -rw-r--r-- 78 bytes
lld.version -rw-r--r-- 60 bytes
llvm-options.mk -rw-r--r-- 564 bytes
llvm-tools.version -rw-r--r-- 182 bytes
llvm-ver.make -rw-r--r-- 595 bytes
llvm.mk -rw-r--r-- 11.0 KB
llvm.version -rw-r--r-- 160 bytes
llvmunwind.version -rw-r--r-- 95 bytes
mbedtls.mk -rw-r--r-- 3.4 KB
mbedtls.version -rw-r--r-- 83 bytes
mpfr.mk -rw-r--r-- 2.4 KB
mpfr.version -rw-r--r-- 73 bytes
nghttp2.mk -rw-r--r-- 2.0 KB
nghttp2.version -rw-r--r-- 102 bytes
objconv.mk -rw-r--r-- 1.0 KB
objconv.version -rw-r--r-- 264 bytes
openblas.mk -rw-r--r-- 8.3 KB
openblas.version -rw-r--r-- 227 bytes
openlibm.mk -rw-r--r-- 1.3 KB
openlibm.version -rw-r--r-- 163 bytes
p7zip.mk -rw-r--r-- 1.6 KB
p7zip.version -rw-r--r-- 76 bytes
patchelf.mk -rw-r--r-- 2.2 KB
patchelf.version -rw-r--r-- 112 bytes
pcre.mk -rw-r--r-- 2.2 KB
pcre.version -rw-r--r-- 74 bytes
unwind.mk -rw-r--r-- 7.5 KB
unwind.version -rw-r--r-- 104 bytes
utf8proc.mk -rw-r--r-- 1.5 KB
utf8proc.version -rw-r--r-- 78 bytes
zlib.mk -rw-r--r-- 1.4 KB
zlib.version -rw-r--r-- 164 bytes

back to top