@@ -311,9 +311,21 @@ VERSION >= v"1.4" && @non_differentiable only(::Char)
311
311
@non_differentiable readuntil (:: IO , :: AbstractChar )
312
312
@non_differentiable readuntil (:: IO , :: AbstractString )
313
313
@non_differentiable realpath (:: AbstractString )
314
- @non_differentiable redirect_stderr (:: Union{IOStream, Base.LibuvStream} )
315
- @non_differentiable redirect_stdin (:: Union{IOStream, Base.LibuvStream} )
316
- @non_differentiable redirect_stdout (:: Union{IOStream, Base.LibuvStream} )
314
+ if isdefined (Base, :redirect_stdio )
315
+ @non_differentiable (:: Base.redirect_stdio )(
316
+ :: Union{IOStream, Base.LibuvStream, Base.DevNull, Base.AbstractPipe} ,
317
+ )
318
+ else
319
+ @non_differentiable redirect_stderr (
320
+ :: Union{IOStream, Base.LibuvStream, Base.DevNull, IOContext} ,
321
+ )
322
+ @non_differentiable redirect_stdin (
323
+ :: Union{IOStream, Base.LibuvStream, Base.DevNull, IOContext} ,
324
+ )
325
+ @non_differentiable redirect_stdout (
326
+ :: Union{IOStream, Base.LibuvStream, Base.DevNull, IOContext} ,
327
+ )
328
+ end
317
329
@non_differentiable relpath (:: AbstractString , :: AbstractString )
318
330
@non_differentiable relpath (:: String )
319
331
@non_differentiable repr (:: Any )
0 commit comments