Skip to content

Commit

Permalink
doc: use isa instead of :: in the docstring for Union (#45104)
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub authored Apr 27, 2022
1 parent 78aa083 commit ce5909c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2523,14 +2523,14 @@ union [`Union{}`](@ref) is the bottom type of Julia.
julia> IntOrString = Union{Int,AbstractString}
Union{Int64, AbstractString}
julia> 1 :: IntOrString
1
julia> 1 isa IntOrString
true
julia> "Hello!" :: IntOrString
"Hello!"
julia> "Hello!" isa IntOrString
true
julia> 1.0 :: IntOrString
ERROR: TypeError: in typeassert, expected Union{Int64, AbstractString}, got a value of type Float64
julia> 1.0 isa IntOrString
false
```
"""
Union
Expand Down

2 comments on commit ce5909c

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your package evaluation job has completed - possible new issues were detected. A full report can be found here.

Please sign in to comment.