Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions test/Core/interface_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ 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.
@test sum(VA[Int8[1, 2, 3]]) === Int64(6)
@test sum(VA[Int8[1, 2], Int8[3, 4]]) === Int64(10)
# `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
@inferred sum(VA[Int8[1, 2, 3]])
# Type stability for `end` indexing (issue #525)
Expand Down
Loading