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 164
164
Base. @nospecializeinfer @inline dict_key (:: Type{<:AbstractDict} ) = nothing
165
165
Base. @nospecializeinfer @inline dict_key (:: Type{<:AbstractDict{K}} ) where {K} = K
166
166
Base. @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
170
180
171
181
Base. @nospecializeinfer function traced_type_inner (
172
182
@nospecialize (T:: Type{<:AbstractDict} ),
Original file line number Diff line number Diff line change 138
138
(Dict{A,TracedRArray{Float64,0 }} where {A}),
139
139
(Dict{A,TracedRArray{Float64,0 }} where {A}),
140
140
),
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
+ ),
141
158
(
142
159
Base. Pairs{Symbol,Union{}},
143
160
Base. Pairs{Symbol,Union{}},
You can’t perform that action at this time.
0 commit comments