We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ntuple
1 parent 9e6a29c commit 95cdf9bCopy full SHA for 95cdf9b
base/ntuple.jl
@@ -72,7 +72,7 @@ julia> ntuple(i -> 2*i, Val(4))
72
if @generated
73
:(@ntuple $N i -> f(i))
74
else
75
- Tuple(f(i) for i = 1:N)
+ Tuple(f(i) for i = 1:(N::Int))
76
end
77
78
typeof(function ntuple end).name.max_methods = UInt8(5)
test/tuple.jl
@@ -532,6 +532,8 @@ end
532
for n = 0:15
533
@test ntuple(identity, Val(n)) == ntuple(identity, n)
534
535
+
536
+ @test Core.Compiler.return_type(ntuple, Tuple{typeof(identity), Val}) == Tuple{Vararg{Int}}
537
538
539
struct A_15703{N}
0 commit comments