Skip to content

Commit 10eb7c5

Browse files
committed
Where syntax in boot.jl file
1 parent c63e29a commit 10eb7c5

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

base/boot.jl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -295,32 +295,32 @@ Task(f::ANY) = ccall(:jl_new_task, Ref{Task}, (Any, Int), f, 0)
295295
# so the methods and ccall's in Core aren't permitted to use convert
296296
convert(::Type{Any}, x::ANY) = x
297297
convert(::Type{T}, x::T) where {T} = x
298-
cconvert{T}(::Type{T}, x) = convert(T, x)
298+
cconvert(::Type{T}, x) where {T} = convert(T, x)
299299
unsafe_convert(::Type{T}, x::T) where {T} = x
300300

301301
NTuple{N,T} = Tuple{Vararg{T,N}}
302302

303303

304304
# primitive array constructors
305-
(::Type{Array{T,N}}){T,N}(d::NTuple{N,Int}) =
305+
(::Type{Array{T,N}})(d::NTuple{N,Int}) where {T,N} =
306306
ccall(:jl_new_array, Array{T,N}, (Any,Any), Array{T,N}, d)
307-
(::Type{Array{T,1}}){T}(d::NTuple{1,Int}) = Array{T,1}(getfield(d,1))
308-
(::Type{Array{T,2}}){T}(d::NTuple{2,Int}) = Array{T,2}(getfield(d,1), getfield(d,2))
309-
(::Type{Array{T,3}}){T}(d::NTuple{3,Int}) = Array{T,3}(getfield(d,1), getfield(d,2), getfield(d,3))
310-
(::Type{Array{T,N}}){T,N}(d::Vararg{Int, N}) = ccall(:jl_new_array, Array{T,N}, (Any,Any), Array{T,N}, d)
311-
(::Type{Array{T,1}}){T}(m::Int) =
307+
(::Type{Array{T,1}})(d::NTuple{1,Int}) where {T} = Array{T,1}(getfield(d,1))
308+
(::Type{Array{T,2}})(d::NTuple{2,Int}) where {T} = Array{T,2}(getfield(d,1), getfield(d,2))
309+
(::Type{Array{T,3}})(d::NTuple{3,Int}) where {T} = Array{T,3}(getfield(d,1), getfield(d,2), getfield(d,3))
310+
(::Type{Array{T,N}})(d::Vararg{Int, N}) where {T,N} = ccall(:jl_new_array, Array{T,N}, (Any,Any), Array{T,N}, d)
311+
(::Type{Array{T,1}})(m::Int) where {T} =
312312
ccall(:jl_alloc_array_1d, Array{T,1}, (Any,Int), Array{T,1}, m)
313-
(::Type{Array{T,2}}){T}(m::Int, n::Int) =
313+
(::Type{Array{T,2}})(m::Int, n::Int) where {T} =
314314
ccall(:jl_alloc_array_2d, Array{T,2}, (Any,Int,Int), Array{T,2}, m, n)
315-
(::Type{Array{T,3}}){T}(m::Int, n::Int, o::Int) =
315+
(::Type{Array{T,3}})(m::Int, n::Int, o::Int) where {T} =
316316
ccall(:jl_alloc_array_3d, Array{T,3}, (Any,Int,Int,Int), Array{T,3}, m, n, o)
317317

318-
(::Type{Array{T}}){T,N}(d::NTuple{N,Int}) = Array{T,N}(d)
319-
(::Type{Array{T}}){T}(m::Int) = Array{T,1}(m)
320-
(::Type{Array{T}}){T}(m::Int, n::Int) = Array{T,2}(m, n)
321-
(::Type{Array{T}}){T}(m::Int, n::Int, o::Int) = Array{T,3}(m, n, o)
318+
(::Type{Array{T}})(d::NTuple{N,Int}) where {T,N} = Array{T,N}(d)
319+
(::Type{Array{T}})(m::Int) where {T} = Array{T,1}(m)
320+
(::Type{Array{T}})(m::Int, n::Int) where {T} = Array{T,2}(m, n)
321+
(::Type{Array{T}})(m::Int, n::Int, o::Int) where {T} = Array{T,3}(m, n, o)
322322

323-
(::Type{Array{T,1}}){T}() = Array{T,1}(0)
323+
(::Type{Array{T,1}})() where {T} = Array{T,1}(0)
324324

325325
# primitive Symbol constructors
326326
function Symbol(s::String)

0 commit comments

Comments
 (0)