Skip to content

Commit

Permalink
Fix line numbers in doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi committed May 25, 2017
1 parent 96b65f1 commit 814a8a1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion base/docs/helpdb/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,7 @@ julia> convert(Int, 3.0)
julia> convert(Int, 3.5)
ERROR: InexactError()
Stacktrace:
[1] convert(::Type{Int64}, ::Float64) at ./float.jl:679
[1] convert(::Type{Int64}, ::Float64) at ./float.jl:680
```
If `T` is a `AbstractFloat` or `Rational` type,
Expand Down
2 changes: 1 addition & 1 deletion doc/src/manual/constructors.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ Point{Int64}(1, 2)
julia> Point{Int64}(1.0,2.5) ## explicit T ##
ERROR: InexactError()
Stacktrace:
[1] convert(::Type{Int64}, ::Float64) at ./float.jl:679
[1] convert(::Type{Int64}, ::Float64) at ./float.jl:680
[2] Point{Int64}(::Float64, ::Float64) at ./none:2
julia> Point{Float64}(1.0, 2.5) ## explicit T ##
Expand Down
4 changes: 2 additions & 2 deletions doc/src/manual/conversion-and-promotion.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ false
julia> convert(Bool, 1im)
ERROR: InexactError()
in convert(::Type{Bool}, ::Complex{Int64}) at ./complex.jl:23
...
Stacktrace:
[1] convert(::Type{Bool}, ::Complex{Int64}) at ./complex.jl:23
julia> convert(Bool, 0im)
false
Expand Down
14 changes: 7 additions & 7 deletions doc/src/manual/mathematical-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,22 +397,22 @@ julia> Int8(127)
julia> Int8(128)
ERROR: InexactError()
Stacktrace:
[1] Int8(::Int64) at ./sysimg.jl:24
[1] Int8(::Int64) at ./sysimg.jl:77
julia> Int8(127.0)
127
julia> Int8(3.14)
ERROR: InexactError()
Stacktrace:
[1] convert(::Type{Int8}, ::Float64) at ./float.jl:658
[2] Int8(::Float64) at ./sysimg.jl:24
[1] convert(::Type{Int8}, ::Float64) at ./float.jl:659
[2] Int8(::Float64) at ./sysimg.jl:77
julia> Int8(128.0)
ERROR: InexactError()
Stacktrace:
[1] convert(::Type{Int8}, ::Float64) at ./float.jl:658
[2] Int8(::Float64) at ./sysimg.jl:24
[1] convert(::Type{Int8}, ::Float64) at ./float.jl:659
[2] Int8(::Float64) at ./sysimg.jl:77
julia> 127 % Int8
127
Expand All @@ -426,8 +426,8 @@ julia> round(Int8,127.4)
julia> round(Int8,127.6)
ERROR: InexactError()
Stacktrace:
[1] trunc(::Type{Int8}, ::Float64) at ./float.jl:651
[2] round(::Type{Int8}, ::Float64) at ./float.jl:337
[1] trunc(::Type{Int8}, ::Float64) at ./float.jl:652
[2] round(::Type{Int8}, ::Float64) at ./float.jl:338
```

See [Conversion and Promotion](@ref conversion-and-promotion) for how to define your own conversions and promotions.
Expand Down
4 changes: 2 additions & 2 deletions doc/src/manual/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ must be convertible to `Int`:
julia> Foo((), 23.5, 1)
ERROR: InexactError()
Stacktrace:
[1] convert(::Type{Int64}, ::Float64) at ./float.jl:679
[1] convert(::Type{Int64}, ::Float64) at ./float.jl:680
[2] Foo(::Tuple{}, ::Float64, ::Int64) at ./none:2
```

Expand Down Expand Up @@ -645,7 +645,7 @@ ERROR: MethodError: Cannot `convert` an object of type Float64 to an object of t
This may have arisen from a call to the constructor Point{Float64}(...),
since type constructors fall back to convert methods.
Stacktrace:
[1] Point{Float64}(::Float64) at ./sysimg.jl:24
[1] Point{Float64}(::Float64) at ./sysimg.jl:77
julia> Point{Float64}(1.0,2.0,3.0)
ERROR: MethodError: no method matching Point{Float64}(::Float64, ::Float64, ::Float64)
Expand Down

0 comments on commit 814a8a1

Please sign in to comment.