Skip to content

Commit

Permalink
2prev
Browse files Browse the repository at this point in the history
  • Loading branch information
bvdmitri committed May 7, 2024
1 parent 0b98ac1 commit feaf522
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/graph_engine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,12 @@ function LazyLabel(name, model, context, index::Tuple)
return LazyLabel(name, model, context)
end

proxylabel(name::Symbol, index::Nothing, proxied::LazyLabel) = proxied
proxylabel(name::Symbol, index::Nothing, proxied::LazyLabel) = ProxyLabel(name, index, proxied)
proxylabel(name::Symbol, index::Tuple, proxied::LazyLabel) = ProxyLabel(name, index, proxied)

proxylabel(name::Symbol, index::Any, proxied::ProxyLabel{Nothing, <:LazyLabel}) = ProxyLabel(name, index, proxied.proxied)
proxylabel(name::Symbol, index::Nothing, proxied::ProxyLabel{Nothing, <:LazyLabel}) = ProxyLabel(name, index, proxied.proxied)

function __proxy_unroll(proxied::LazyLabel)
return haskey(proxied.context, proxied.name) ? proxied.context[proxied.name] : getorcreate!(proxied.model, proxied.context, proxied.name, nothing)
end
Expand Down

0 comments on commit feaf522

Please sign in to comment.