diff --git a/src/stdlib/models/Op.jl b/src/stdlib/models/Op.jl index 6658edad..9c34013f 100644 --- a/src/stdlib/models/Op.jl +++ b/src/stdlib/models/Op.jl @@ -18,7 +18,7 @@ using .ThCategory rename(::Nothing, ::Dict{Symbol,Symbol}) = nothing rename(nt::NamedTuple, d::Dict{Symbol,Symbol}) = - NamedTuple(Dict([get(d, k, k) => v for (k, v) in pairs(nt)])) + NamedTuple(get(d, k, k) => v for (k, v) in pairs(nt)) @instance ThCategory{ObT, HomT} (;model::OpC{ObT, HomT, C}) where {ObT, HomT, C} begin diff --git a/test/stdlib/models/Op.jl b/test/stdlib/models/Op.jl index a18fa22d..c2a4b215 100644 --- a/test/stdlib/models/Op.jl +++ b/test/stdlib/models/Op.jl @@ -13,6 +13,7 @@ using .ThCategory @test id(2) == [1,2] @test compose([1,1,1,3,2], [5]) == [2] + @test compose([1,1,1,3,2], [5]; context=(;)) == [2] @test codom([5]) == 1 @test dom([5]; context=(c=10,)) == 10 end