Skip to content

Commit 1087d0c

Browse files
stevengjmbauman
authored andcommitted
more tupocolypse (JuliaLang#10380) updates
1 parent a7322a2 commit 1087d0c

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

base/multimedia.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ end
3535
# in order to provide a way to export T as a given mime type.
3636

3737
mimewritable{mime}(::MIME{mime}, x) =
38-
method_exists(writemime, (IO, MIME{mime}, typeof(x)))
38+
method_exists(writemime, Tuple{IO, MIME{mime}, typeof(x)})
3939

4040
# it is convenient to accept strings instead of ::MIME
4141
writemime(io::IO, m::AbstractString, x) = writemime(io, MIME(m), x)
@@ -173,7 +173,7 @@ function display(m::MIME, x)
173173
end
174174

175175
displayable{D<:Display,mime}(d::D, ::MIME{mime}) =
176-
method_exists(display, (D, MIME{mime}, Any))
176+
method_exists(display, Tuple{D, MIME{mime}, Any})
177177

178178
function displayable(m::MIME)
179179
for d in displays

base/reducedim.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ promote_union(T::UnionType) = promote_type(T.types...)
9494
promote_union(T) = T
9595
function reducedim_init{S}(f, op::AddFun, A::AbstractArray{S}, region)
9696
T = promote_union(S)
97-
if method_exists(zero, (Type{T},))
97+
if method_exists(zero, Tuple{Type{T}})
9898
x = f(zero(T))
9999
z = zero(x) + zero(x)
100100
Tr = typeof(z) == typeof(x) && !isbits(T) ? T : typeof(z)
@@ -107,7 +107,7 @@ end
107107

108108
function reducedim_init{S}(f, op::MulFun, A::AbstractArray{S}, region)
109109
T = promote_union(S)
110-
if method_exists(zero, (Type{T},))
110+
if method_exists(zero, Tuple{Type{T}})
111111
x = f(zero(T))
112112
z = one(x) * one(x)
113113
Tr = typeof(z) == typeof(x) && !isbits(T) ? T : typeof(z)

doc/stdlib/arrays.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ Indexing, Assignment, and Concatenation
263263

264264
Concatenate along dimension 2
265265

266-
.. function:: hvcat(rows::(Int...), values...)
266+
.. function:: hvcat(rows::Tuple{Vararg{Int}}, values...)
267267

268268
Horizontal and vertical concatenation in one call. This function is called for
269269
block matrix syntax. The first argument specifies the number of arguments to

doc/stdlib/base.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ Types
394394
julia> structinfo(T) = [zip(fieldoffsets(T),fieldnames(T),T.types)...];
395395

396396
julia> structinfo(StatStruct)
397-
12-element Array{(Int64,Symbol,DataType),1}:
397+
12-element Array{Tuple{Int64,Symbol,DataType},1}:
398398
(0,:device,UInt64)
399399
(8,:inode,UInt64)
400400
(16,:mode,UInt64)
@@ -490,13 +490,13 @@ Generic Functions
490490
``apply`` is called to implement the ``...`` argument splicing syntax,
491491
and is usually not called directly: ``apply(f,x) === f(x...)``
492492

493-
.. function:: method_exists(f, tuple) -> Bool
493+
.. function:: method_exists(f, Tuple type) -> Bool
494494

495-
Determine whether the given generic function has a method matching the given tuple of argument types.
495+
Determine whether the given generic function has a method matching the given ``Tuple`` of argument types.
496496

497497
.. doctest::
498498

499-
julia> method_exists(length, (Array,))
499+
julia> method_exists(length, Tuple{Array})
500500
true
501501

502502
.. function:: applicable(f, args...) -> Bool
@@ -1004,6 +1004,6 @@ Internals
10041004

10051005
Evaluates the arguments to the function call, determines their types, and calls :func:`code_native` on the resulting expression
10061006

1007-
.. function:: precompile(f,args::(Any...,))
1007+
.. function:: precompile(f,args::Tuple{Vararg{Any}})
10081008

10091009
Compile the given function ``f`` for the argument tuple (of types) ``args``, but do not execute it.

doc/stdlib/profile.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The methods in :mod:`Base.Profile` are not exported and need to be called e.g. a
6868
number. This function allows you to save profiling results for
6969
future analysis.
7070

71-
.. function:: callers(funcname, [data, lidict], [filename=<filename>], [linerange=<start:stop>]) -> Vector{(count, linfo)}
71+
.. function:: callers(funcname, [data, lidict], [filename=<filename>], [linerange=<start:stop>]) -> Vector{Tuple{count, linfo}}
7272

7373
Given a previous profiling run, determine who called a particular
7474
function. Supplying the filename (and optionally, range of line

examples/juliatypes.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ function test_no_diagonal()
606606
@test issub(Ty((Int,String,Vector{Any})),
607607
@UnionAll T tupletype(T, T, inst(ArrayT,T,1)))
608608

609-
@test isequal_type(Ty(Array{(Integer,Integer),1}),
609+
@test isequal_type(Ty(Array{Tuple{Integer,Integer},1}),
610610
inst(ArrayT, (@UnionAll T<:Ty(Integer) tupletype(T,T)), 1))
611611

612612
@test issub(Ty((Float32,Array{Real,1})),
@@ -667,18 +667,18 @@ function test_3()
667667
@UnionAll T tupletype(T, T, inst(ArrayT,T,1)))
668668
@test !issub(Ty((String,Int,Vector{Integer})),
669669
@UnionAll T tupletype(T, T, inst(ArrayT,T,1)))
670-
@test !issub(Ty((Int,String,Vector{(Integer,)})),
670+
@test !issub(Ty((Int,String,Vector{Tuple{Integer}})),
671671
@UnionAll T tupletype(T,T,inst(ArrayT,tupletype(T),1)))
672672

673673
@test !issub(Ty((Int,String,Vector{Any})),
674674
@UnionAll T tupletype(T, T, inst(ArrayT,T,1)))
675675

676676
@test isequal_type(Ty(Array{Int,1}), inst(ArrayT, (@UnionAll T<:Ty(Int) T), 1))
677-
@test isequal_type(Ty(Array{(Any,),1}), inst(ArrayT, (@UnionAll T tupletype(T)), 1))
677+
@test isequal_type(Ty(Array{Tuple{Any},1}), inst(ArrayT, (@UnionAll T tupletype(T)), 1))
678678

679-
@test isequal_type(Ty(Array{(Int,Int),1}),
679+
@test isequal_type(Ty(Array{Tuple{Int,Int},1}),
680680
inst(ArrayT, (@UnionAll T<:Ty(Int) tupletype(T,T)), 1))
681-
@test !issub(Ty(Array{(Int,Integer),1}),
681+
@test !issub(Ty(Array{Tuple{Int,Integer},1}),
682682
inst(ArrayT, (@UnionAll T<:Ty(Integer) tupletype(T,T)), 1))
683683

684684

0 commit comments

Comments
 (0)