@@ -295,32 +295,32 @@ Task(f::ANY) = ccall(:jl_new_task, Ref{Task}, (Any, Int), f, 0)
295
295
# so the methods and ccall's in Core aren't permitted to use convert
296
296
convert (:: Type{Any} , x:: ANY ) = x
297
297
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)
299
299
unsafe_convert (:: Type{T} , x:: T ) where {T} = x
300
300
301
301
NTuple{N,T} = Tuple{Vararg{T,N}}
302
302
303
303
304
304
# 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} =
306
306
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} =
312
312
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} =
314
314
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} =
316
316
ccall (:jl_alloc_array_3d , Array{T,3 }, (Any,Int,Int,Int), Array{T,3 }, m, n, o)
317
317
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)
322
322
323
- (:: Type{Array{T,1}} ){T}() = Array {T,1} (0 )
323
+ (:: Type{Array{T,1}} )() where {T} = Array {T,1} (0 )
324
324
325
325
# primitive Symbol constructors
326
326
function Symbol (s:: String )
0 commit comments