|
146 | 146 | test_inferred(FixedSizeVector{Int}, return_type, (undef, (3,))) |
147 | 147 | iter = Iterators.filter(iseven, 3:7) |
148 | 148 | @test collect_as(FixedSizeArray, iter) isa return_type |
149 | | - test_inferred(collect_as, return_type, (FixedSizeArray{Int}, iter)) |
150 | | - test_inferred(collect_as, return_type, (FixedSizeVector{Int}, iter)) |
| 149 | + if VERSION >= v"1.12-" |
| 150 | + # Not inferred, see #160 |
| 151 | + @test false broken=true |
| 152 | + else |
| 153 | + test_inferred(collect_as, return_type, (FixedSizeArray{Int}, iter)) |
| 154 | + test_inferred(collect_as, return_type, (FixedSizeVector{Int}, iter)) |
| 155 | + end |
151 | 156 | arr = ([1, 2, 3],) |
152 | 157 | test_inferred(FixedSizeArray, return_type, arr) |
153 | 158 | test_inferred(FixedSizeVector, return_type, arr) |
|
541 | 546 | @test prod(shape1) === prod(shape2) === len # meta |
542 | 547 | T = FSA{elem_type,length(shape2)} |
543 | 548 | test_inferred_noalloc(reshape, T, (a, shape2)) |
544 | | - test_inferred_noalloc(reshape, T, (a, shape2...)) |
| 549 | + if VERSION >= v"1.12-" && length(shape2) > 2 |
| 550 | + test_inferred(reshape, T, (a, shape2...)) |
| 551 | + @test false broken=true # no allocations is broken, see #160 |
| 552 | + else |
| 553 | + test_inferred_noalloc(reshape, T, (a, shape2...)) |
| 554 | + end |
545 | 555 | b = reshape(a, shape2) |
546 | 556 | @test size(b) === shape2 |
547 | 557 | @test parent(a) === parent(b) |
|
621 | 631 | iszero(dim_count) || |
622 | 632 | @test_throws DimensionMismatch collect_as(FSA{E,dim_count+1}, iterator) |
623 | 633 | for T ∈ (FSA{E}, FSA{E,dim_count}) |
624 | | - test_inferred(collect_as, FSA{E,dim_count}, (T, iterator)) |
| 634 | + if v"1.12-" <= VERSION < v"1.13-" |
| 635 | + # Not inferred, see #160 |
| 636 | + @test false broken=true |
| 637 | + else |
| 638 | + test_inferred(collect_as, FSA{E,dim_count}, (T, iterator)) |
| 639 | + end |
625 | 640 | fsa = collect_as(T, iterator) |
626 | 641 | @test a == fsa |
627 | 642 | @test first(abstract_array_params(fsa)) <: E |
|
635 | 650 | @test first(abstract_array_params(fsa)) <: E |
636 | 651 | end |
637 | 652 | for T ∈ (FSA{Float64}, FSA{Float64,dim_count}) |
638 | | - test_inferred(collect_as, FSA{Float64,dim_count}, (T, iterator)) |
| 653 | + if v"1.12-" <= VERSION < v"1.13-" |
| 654 | + # Not inferred, see #160 |
| 655 | + @test false broken=true |
| 656 | + else |
| 657 | + test_inferred(collect_as, FSA{Float64,dim_count}, (T, iterator)) |
| 658 | + end |
639 | 659 | fsa = collect_as(T, iterator) |
640 | 660 | @test af == fsa |
641 | 661 | @test first(abstract_array_params(fsa)) <: Float64 |
|
0 commit comments