You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like if you have an error in struct definition with Base.@kwdef, you can always get a error report which indicate that the error take place in util.jl, like:
the source code in TestKwdef.jl:
module TestKwdef
export Foo
Base.@kwdefmutable struct Foo
a::Int=1
b::Int= c # error! line: 7 in my editorendend# module
but the error report:
julia> foo = Foo()
ERROR: UndefVarError: c not defined
Stacktrace:
[1] Foo()
@ TestKwdef .\util.jl:450
[2] top-level scope
@ REPL[4]:1
here's versioninfo:
julia> versioninfo()
Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: AMD Ryzen 7 4800H with Radeon Graphics
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, znver2)
Environment:
JULIA_PKG_SERVER = https://mirrors.sjtug.sjtu.edu.cn/julia
The text was updated successfully, but these errors were encountered:
AIxer
changed the title
Wrong code error report in Base.kwdef
Wrong error report with Base.@kwdefOct 27, 2021
It seems like if you have an error in struct definition with
Base.@kwdef
, you can always get a error report which indicate that the error take place inutil.jl
, like:the source code in
TestKwdef.jl
:but the error report:
here's
versioninfo
:The text was updated successfully, but these errors were encountered: