Skip to content

Commit a850b7e

Browse files
authored
add a test for #30739 (#36395)
1 parent 0a661f9 commit a850b7e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/compiler/codegen.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,3 +444,10 @@ function _handle_message_test()
444444
return _handle_progress_test(progress)
445445
end
446446
@test _handle_message_test() isa Tuple{Base.UUID, String}
447+
448+
@testset "#30739" begin
449+
ifelsetuple(n::Integer, k::Integer, f, g) = ntuple(i -> (i <= k ? f : g), n)
450+
f(x) = x^2; g(x) = x^3;
451+
a = [1]; b = [2]
452+
@test ifelsetuple(5, 3, a, b) == ([1], [1], [1], [2], [2])
453+
end

0 commit comments

Comments
 (0)