Skip to content

Commit

Permalink
Fix JuliaData#92. Unapplied defaults should be checked in applyfield!.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunoru committed Sep 14, 2023
1 parent 9cca137 commit 39f6ae2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/StructTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,9 @@ mappings will be applied, and the function will be passed the Julia field name.
end
end
)
if !f_applied && haskey(defaults(T), nm)
setfield!(x, nm, defaults(T)[nm])
end
return f_applied
end

Expand Down Expand Up @@ -890,9 +893,6 @@ mappings will be applied, and the function will be passed the Julia field name.
end
end
)
if !f_applied && haskey(defaults(T), nm)
setfield!(x, nm, defaults(T)[nm])
end
return f_applied
end

Expand Down

0 comments on commit 39f6ae2

Please sign in to comment.