We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In my codes, I use the
foo() = begin end
convention instead of
function foo() end
As a results, this fails:
julia> using ObjectOriented julia> @oodef struct Foo new() = begin @mk end end ERROR: LoadError: MethodError: Cannot `convert` an object of type Expr to an object of type Symbol Closest candidates are: convert(::Type{T}, ::T) where T at essentials.jl:205 Symbol(::Any...) at strings/basic.jl:229 Stacktrace: [1] ObjectOriented.CompileTime.FieldInfo(ln::Any, name::Any, type::Any, defaultVal::Any) @ ObjectOriented.CompileTime [...]/.julia/packages/ObjectOriented/1M2LB/src/compile-time.reflection.jl:115 [2] ObjectOriented.CompileTime.FieldInfo(; ln::Any, name::Any, type::Any, defaultVal::Any) @ ObjectOriented.CompileTime util.jl:453 [3] parse_field_def(ln::LineNumberNode, f::Any; fallback::Nothing) @ ObjectOriented.CompileTime [...]/.julia/packages/ObjectOriented/1M2LB/src/compile-time.reflection.jl:254 [4] parse_class_body!(ln::LineNumberNode, self::ObjectOriented.CompileTime.TypeDef, body::Any; preprocess::ObjectOriented.CompileTime.var"#preprocess#47"{Module}) @ ObjectOriented.CompileTime [...]/.julia/packages/ObjectOriented/1M2LB/src/compile-time.reflection.jl:230 [5] parse_class(ln::LineNumberNode, def::Any; preprocess::ObjectOriented.CompileTime.var"#preprocess#47"{Module}) @ ObjectOriented.CompileTime [...]/.julia/packages/ObjectOriented/1M2LB/src/compile-time.reflection.jl:170 [6] var"@oodef"(__source__::LineNumberNode, __module__::Module, ex::Any) @ ObjectOriented.CompileTime [...]/.julia/packages/ObjectOriented/1M2LB/src/compile-time.jl:21 in expression starting at REPL[4]:1
We hit this pattern matching:
ObjectOriented.jl/src/compile-time.reflection.jl
Line 254 in 580c3f7
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
In my codes, I use the
convention instead of
As a results, this fails:
We hit this pattern matching:
ObjectOriented.jl/src/compile-time.reflection.jl
Line 254 in 580c3f7
The text was updated successfully, but these errors were encountered: