Commit 798e447
Fix JET warning related to
Calls to this method are produced by syntax lowering for simple typed
comprehensions. The current signature is ambiguous, making JET believe
that the modified method could have ended up invoking itself. Resolve
this by renaming the other methods.
These are the the warnings I am seeing while JETing a package:
```
││┌ _array_for(::Type{T}, itr::AbstractVector{T} where T<:NCRingElement, isz::Any) where T @ Base ./array.jl:673
│││┌ _array_for(::Type, itr::Base.SizeUnknown, isz::Any) @ Base ./array.jl:673
││││┌ _similar_shape(itr::Base.SizeUnknown, ::Base.HasLength) @ Base ./array.jl:657
│││││ no matching method found `length(::Base.SizeUnknown)`: length(itr::Base.SizeUnknown)
││││└────────────────────
││││┌ _similar_shape(itr::Base.SizeUnknown, ::Base.HasShape) @ Base ./array.jl:658
│││││┌ axes(A::Base.SizeUnknown) @ Base ./abstractarray.jl:98
││││││ no matching method found `size(::Base.SizeUnknown)`: size(A::Base.SizeUnknown)
│││││└────────────────────
```
and
```
││││││││┌ Base.AnnotatedString(s::String, annots::Any) @ Base ./strings/annotated.jl:107
│││││││││┌ collect(::Type{@NamedTuple{region::UnitRange{Int64}, label::Symbol, value}}, itr::Any) @ Base ./array.jl:641
││││││││││┌ _collect(::Type{@NamedTuple{…}}, itr::Any, isz::Union{Base.HasLength, Base.HasShape}) @ Base ./array.jl:643
│││││││││││┌ _array_for(::Type{@NamedTuple{region::UnitRange{Int64}, label::Symbol, value}}, itr::Base.HasLength, isz::Any) @ Base ./array.jl:673
││││││││││││┌ _similar_shape(itr::Base.HasLength, ::Base.HasLength) @ Base ./array.jl:657
│││││││││││││ no matching method found `length(::Base.HasLength)`: length(itr::Base.HasLength)
││││││││││││└────────────────────
││││││││││││┌ _similar_shape(itr::Base.HasLength, ::Base.HasShape) @ Base ./array.jl:658
│││││││││││││┌ axes(A::Base.HasLength) @ Base ./abstractarray.jl:98
││││││││││││││ no matching method found `size(::Base.HasLength)`: size(A::Base.HasLength)
│││││││││││││└────────────────────
││││││││││││┌ _array_for(::Type{@NamedTuple{region::UnitRange{Int64}, label::Symbol, value}}, itr::Base.HasLength, isz::Nothing) @ Base ./array.jl:673
│││││││││││││ no matching method found `_similar_shape(::Base.HasLength, ::Nothing)`: Base._similar_shape(itr::Base.HasLength, isz::Nothing)
││││││││││││└────────────────────
```_array_for (#60461)1 parent fb87ed4 commit 798e447
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
644 | | - | |
| 644 | + | |
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
| |||
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
668 | | - | |
669 | | - | |
670 | | - | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
671 | 671 | | |
672 | 672 | | |
673 | | - | |
| 673 | + | |
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| |||
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
792 | | - | |
| 792 | + | |
793 | 793 | | |
794 | 794 | | |
795 | | - | |
| 795 | + | |
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
| |||
0 commit comments