File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ function parametric_type_to_expr(t::Type)
243
243
t isa Core. TypeofBottom && return t
244
244
t isa UnionAll && (t = t. body)
245
245
t = t:: DataType
246
- if t <: Vararg
246
+ if Base . isvarargtype (t)
247
247
return Expr (:(... ), t. parameters[1 ])
248
248
end
249
249
if t. hasfreetypevars
Original file line number Diff line number Diff line change @@ -248,12 +248,16 @@ end
248
248
is_leaf (frame:: Frame ) = frame. callee === nothing
249
249
250
250
function is_vararg_type (x)
251
- if isa (x, Type)
252
- (x <: Vararg && ! (x <: Union{} )) && return true
253
- if isa (x, UnionAll)
254
- x = Base. unwrap_unionall (x)
251
+ if isa (Vararg, Type)
252
+ if isa (x, Type)
253
+ (x <: Vararg && ! (x <: Union{} )) && return true
254
+ if isa (x, UnionAll)
255
+ x = Base. unwrap_unionall (x)
256
+ end
257
+ return isa (x, DataType) && nameof (x) == :Vararg
255
258
end
256
- return isa (x, DataType) && nameof (x) == :Vararg
259
+ else
260
+ return isa (x, typeof (Vararg))
257
261
end
258
262
return false
259
263
end
You can’t perform that action at this time.
0 commit comments