From b0e3436d88f060a2d7bc91e142590e88f8366133 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Tue, 8 Sep 2026 18:55:25 -0400 Subject: [PATCH 1/2] Use native Int in VectorOfArray sum type assertions. On 32-bit Julia, summing Int8 indices promotes to Int32, so comparing against Int64 fails even though the numeric value is correct. Co-authored-by: Cursor --- test/Core/interface_tests.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Core/interface_tests.jl b/test/Core/interface_tests.jl index dfbd4f81..e0bd7c21 100644 --- a/test/Core/interface_tests.jl +++ b/test/Core/interface_tests.jl @@ -137,8 +137,8 @@ push!(testda, [-1, -2, -3, -4]) # sum must follow Base's promotion, not the element type (issue #595): # `Int8` elements sum to `Int64`, so asserting the result is `::Int8` is wrong. -@test sum(VA[Int8[1, 2, 3]]) === Int64(6) -@test sum(VA[Int8[1, 2], Int8[3, 4]]) === Int64(10) +@test sum(VA[Int8[1, 2, 3]]) === Int(6) +@test sum(VA[Int8[1, 2], Int8[3, 4]]) === Int(10) @test sum(VA[Float32[1, 2, 3]]) === 6.0f0 @inferred sum(VA[Int8[1, 2, 3]]) # Type stability for `end` indexing (issue #525) From bdcbe882bb851c876b9caf44d61e0f7d05d7ed4e Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Tue, 8 Sep 2026 18:55:57 -0400 Subject: [PATCH 2/2] Clarify Int8 sum promotion comment for 32-bit Int. Co-authored-by: Cursor --- test/Core/interface_tests.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/Core/interface_tests.jl b/test/Core/interface_tests.jl index e0bd7c21..c4aa6ae8 100644 --- a/test/Core/interface_tests.jl +++ b/test/Core/interface_tests.jl @@ -136,7 +136,8 @@ push!(testda, [-1, -2, -3, -4]) @inferred mapreduce(string, *, testva) # sum must follow Base's promotion, not the element type (issue #595): -# `Int8` elements sum to `Int64`, so asserting the result is `::Int8` is wrong. +# `Int8` elements sum to native `Int` (Int64 on 64-bit, Int32 on 32-bit), +# so asserting the result is `::Int8` is wrong. @test sum(VA[Int8[1, 2, 3]]) === Int(6) @test sum(VA[Int8[1, 2], Int8[3, 4]]) === Int(10) @test sum(VA[Float32[1, 2, 3]]) === 6.0f0