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
@kwdef handles conversion but @proto does not seem to.
@kwdef
@proto
julia> @kwdef struct Bubba x::Int = 3; y::Float64 = 5; end Bubba julia> Bubba() Bubba(3, 5.0) julia> @proto @kwdef struct Gump x::Int = 3; y::Float64 = 5; end julia> Gump() ERROR: MethodError: no method matching Gump(::Int64, ::Int64) Closest candidates are: Gump(::Int64, ::Float64) @ Main ~/.julia/packages/ProtoStructs/6Bp9y/src/ProtoStruct.jl:223 Stacktrace: [1] Gump(; x::Int64, y::Int64) @ Main ~/.julia/packages/ProtoStructs/6Bp9y/src/ProtoStruct.jl:233 [2] Gump() @ Main ~/.julia/packages/ProtoStructs/6Bp9y/src/ProtoStruct.jl:232 [3] top-level scope @ REPL[5]:1
Just guessing here but is the constructor function generated based on the initializer types instead of the declared types?
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
@kwdef
handles conversion but@proto
does not seem to.Just guessing here but is the constructor function generated based on the initializer types instead of the declared types?
The text was updated successfully, but these errors were encountered: