File tree Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 164164Base. @nospecializeinfer @inline dict_key (:: Type{<:AbstractDict} ) = nothing
165165Base. @nospecializeinfer @inline dict_key (:: Type{<:AbstractDict{K}} ) where {K} = K
166166Base. @nospecializeinfer @inline dict_value (:: Type{<:AbstractDict} ) = nothing
167- Base. @nospecializeinfer @inline dict_value (
168- :: Type{<:(AbstractDict{K,V} where {K})}
169- ) where {V} = V
167+ Base. @nospecializeinfer @inline function dict_value (
168+ T:: Type{<:(AbstractDict{K,V} where {K})}
169+ ) where {V}
170+ if @isdefined (V)
171+ V
172+ elseif T <: UnionAll
173+ dict_value (T. body)
174+ elseif T <: Dict && length (T. parameters) >= 2
175+ T. parameters[2 ]
176+ else
177+ error (" Could not get element type of $T " )
178+ end
179+ end
170180
171181Base. @nospecializeinfer function traced_type_inner (
172182 @nospecialize (T:: Type{<:AbstractDict} ),
Original file line number Diff line number Diff line change 138138 (Dict{A,TracedRArray{Float64,0 }} where {A}),
139139 (Dict{A,TracedRArray{Float64,0 }} where {A}),
140140 ),
141+ (
142+ (
143+ Dict{
144+ Symbol,NTuple{nsteps,SpectralVariable3D}
145+ } where {nsteps} where {SpectralVariable3D}
146+ ),
147+ (
148+ Dict{
149+ Symbol,NTuple{nsteps,SpectralVariable3D}
150+ } where {nsteps} where {SpectralVariable3D}
151+ ),
152+ (
153+ Dict{
154+ Symbol,NTuple{nsteps,SpectralVariable3D}
155+ } where {nsteps} where {SpectralVariable3D}
156+ ),
157+ ),
141158 (
142159 Base. Pairs{Symbol,Union{}},
143160 Base. Pairs{Symbol,Union{}},
You can’t perform that action at this time.
0 commit comments