Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a type assert to read on a Cmd #48334

Merged
merged 1 commit into from
Jan 19, 2023
Merged

add a type assert to read on a Cmd #48334

merged 1 commit into from
Jan 19, 2023

Conversation

KristofferC
Copy link
Member

julia> @code_warntype read(`foo`)
MethodInstance for read(::Cmd)
  from read(cmd::Base.AbstractCmd) @ Base process.jl:446
Arguments
  #self#::Core.Const(read)
  cmd::Cmd
Locals
  bytes::Any
  procs::Base.Process
Body::Any
1 ─      (procs = Base.open(cmd, "r", Base.devnull))
│   %2 = Base.getproperty(procs, :out)::IO
│        (bytes = Base.read(%2))
│   %4 = Base.success(procs)::Bool
└──      goto #3 if not %4
2 ─      goto #4
3 ─      Base.pipeline_error(procs)
4return bytes

@KristofferC KristofferC added the backport 1.9 Change should be backported to release-1.9 label Jan 18, 2023
@KristofferC KristofferC merged commit 1bff32b into master Jan 19, 2023
@KristofferC KristofferC deleted the kc/typeassert branch January 19, 2023 11:44
KristofferC added a commit that referenced this pull request Jan 23, 2023
(cherry picked from commit 1bff32b)
@KristofferC KristofferC mentioned this pull request Feb 1, 2023
35 tasks
@KristofferC KristofferC removed the backport 1.9 Change should be backported to release-1.9 label Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants