Skip to content

Commit 548465b

Browse files
xorJanetkelman
authored andcommitted
Fix some failing doctests with minor edits to expected output (#19316)
1 parent 806fb92 commit 548465b

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

base/docs/helpdb/Base.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2799,7 +2799,7 @@ julia> convert(Int, 3.0)
27992799
28002800
julia> convert(Int, 3.5)
28012801
ERROR: InexactError()
2802-
in convert(::Type{Int64}, ::Float64) at ./float.jl:637
2802+
in convert(::Type{Int64}, ::Float64) at ./float.jl:656
28032803
...
28042804
```
28052805

base/nullable.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Nullable{String}()
111111
112112
julia> unsafe_get(x)
113113
ERROR: UndefRefError: access to undefined reference
114-
in unsafe_get(::Nullable{String}) at ./nullable.jl:123
114+
in unsafe_get(::Nullable{String}) at ./nullable.jl:124
115115
...
116116
117117
julia> x = 1

doc/devdocs/types.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,11 @@ a lot about how Julia does dispatch:
215215

216216
julia> methods(candid)
217217
# 1 method for generic function "candid":
218-
candid{T}(A::Array{T,N<:Any}, x::T) at none:1
218+
candid{T}(A::Array{T,N<:Any}, x::T) in Main at none:1
219219

220220
julia> methods(sneaky)
221221
# 1 method for generic function "sneaky":
222-
sneaky{T}(A::Array{T,N<:Any}, x::T<:Any) at none:1
222+
sneaky{T}(A::Array{T,N<:Any}, x::T<:Any) in Main at none:1
223223

224224
These therefore print identically, but they have very different behavior:
225225

doc/manual/constructors.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ types of the arguments given to the constructor. Here are some examples:
338338

339339
julia> Point{Int64}(1.0,2.5)
340340
ERROR: InexactError()
341-
in convert(::Type{Int64}, ::Float64) at ./float.jl:637
341+
in convert(::Type{Int64}, ::Float64) at ./float.jl:656
342342
in Point{Int64}(::Float64, ::Float64) at ./none:2
343343
...
344344

doc/manual/mathematical-operations.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -411,13 +411,13 @@ The following examples show the different forms.
411411

412412
julia> Int8(3.14)
413413
ERROR: InexactError()
414-
in convert(::Type{Int8}, ::Float64) at ./float.jl:616
414+
in convert(::Type{Int8}, ::Float64) at ./float.jl:635
415415
in Int8(::Float64) at ./sysimg.jl:66
416416
...
417417

418418
julia> Int8(128.0)
419419
ERROR: InexactError()
420-
in convert(::Type{Int8}, ::Float64) at ./float.jl:616
420+
in convert(::Type{Int8}, ::Float64) at ./float.jl:635
421421
in Int8(::Float64) at ./sysimg.jl:66
422422
...
423423

@@ -432,8 +432,8 @@ The following examples show the different forms.
432432

433433
julia> round(Int8,127.6)
434434
ERROR: InexactError()
435-
in trunc(::Type{Int8}, ::Float64) at ./float.jl:609
436-
in round(::Type{Int8}, ::Float64) at ./float.jl:313
435+
in trunc(::Type{Int8}, ::Float64) at ./float.jl:628
436+
in round(::Type{Int8}, ::Float64) at ./float.jl:332
437437
...
438438

439439
See :ref:`man-conversion-and-promotion` for how to define your own

doc/manual/methods.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ methods. To find out what the signatures of those methods are, use the
206206

207207
julia> methods(f)
208208
# 2 methods for generic function "f":
209-
f(x::Float64, y::Float64) at none:1
210-
f(x::Number, y::Number) at none:1
209+
f(x::Float64, y::Float64) in Main at none:1
210+
f(x::Number, y::Number) in Main at none:1
211211

212212
which shows that ``f`` has two methods, one taking two :obj:`Float64`
213213
arguments and one taking arguments of type :obj:`Number`. It also
@@ -286,8 +286,8 @@ arguments:
286286

287287
julia> g(2.0, 3.0)
288288
ERROR: MethodError: g(::Float64, ::Float64) is ambiguous. Candidates:
289-
g(x, y::Float64) at none:1
290-
g(x::Float64, y) at none:1
289+
g(x, y::Float64) in Main at none:1
290+
g(x::Float64, y) in Main at none:1
291291
...
292292

293293
Here the call ``g(2.0, 3.0)`` could be handled by either the

doc/manual/types.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ However, the value for ``baz`` must be convertible to :class:`Int`:
410410

411411
julia> Foo((), 23.5, 1)
412412
ERROR: InexactError()
413-
in convert(::Type{Int64}, ::Float64) at ./float.jl:637
413+
in convert(::Type{Int64}, ::Float64) at ./float.jl:656
414414
in Foo(::Tuple{}, ::Float64, ::Int64) at ./none:2
415415
...
416416

@@ -1488,7 +1488,7 @@ You can safely access the value of a :obj:`Nullable` object using :func:`get`:
14881488

14891489
julia> get(Nullable{Float64}())
14901490
ERROR: NullException()
1491-
in get(::Nullable{Float64}) at ./nullable.jl:90
1491+
in get(::Nullable{Float64}) at ./nullable.jl:91
14921492
...
14931493

14941494
julia> get(Nullable(1.0))

doc/stdlib/base.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ All Objects
381381

382382
julia> convert(Int, 3.5)
383383
ERROR: InexactError()
384-
in convert(::Type{Int64}, ::Float64) at ./float.jl:637
384+
in convert(::Type{Int64}, ::Float64) at ./float.jl:656
385385
...
386386

387387
If ``T`` is a :obj:`AbstractFloat` or :obj:`Rational` type, then it will return the closest value to ``x`` representable by ``T``\ .
@@ -896,7 +896,7 @@ Nullables
896896

897897
julia> unsafe_get(x)
898898
ERROR: UndefRefError: access to undefined reference
899-
in unsafe_get(::Nullable{String}) at ./nullable.jl:123
899+
in unsafe_get(::Nullable{String}) at ./nullable.jl:124
900900
...
901901

902902
julia> x = 1

0 commit comments

Comments
 (0)