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
Just wondering if this is a bug or a feature. Using the julia docs example:
julia> struct SummedArray{T<:Number,S<:Number} data::Vector{T} sum::S function SummedArray(a::Vector{T}) where T S = widen(T) new{T,S}(a, sum(S, a)) end end julia> sa = SummedArray([1,2,3]) SummedArray{Int64, Int128}([1, 2, 3], 6) julia> @set sa.sum = 5 ERROR: MethodError: no method matching SummedArray(::Vector{Int64}, ::Int64) Closest candidates are: SummedArray(::Vector{T}) where T at REPL[14]:4 Stacktrace: [1] setproperties_object(obj::SummedArray{Int64, Int128}, patch::NamedTuple{(:sum,), Tuple{Int64}}) @ ConstructionBase C:\Users\ilyao\.julia\packages\ConstructionBase\N3vfl\src\ConstructionBase.jl:149 [2] setproperties(obj::SummedArray{Int64, Int128}, patch::NamedTuple{(:sum,), Tuple{Int64}}) @ ConstructionBase C:\Users\ilyao\.julia\packages\ConstructionBase\N3vfl\src\ConstructionBase.jl:63 [3] set(obj::SummedArray{Int64, Int128}, l::Accessors.PropertyLens{:sum}, val::Int64) @ Accessors C:\Users\ilyao\.julia\packages\Accessors\KLYEx\src\optics.jl:376 [4] top-level scope @ REPL[16]:1
The text was updated successfully, but these errors were encountered:
You can overload ConstructionBase.setproperties for types with inner constructors https://github.com/JuliaObjects/ConstructionBase.jl
ConstructionBase.setproperties
Sorry, something went wrong.
No branches or pull requests
Just wondering if this is a bug or a feature. Using the julia docs example:
The text was updated successfully, but these errors were encountered: