Skip to content

Commit 43fb018

Browse files
Kenotecosaur
authored andcommitted
Add types to some comprehensions
Currently the correctness of this depends on the exact typejoin logic for comprehensions. That's probably reasonably safe, but it can break when developing Base, and since this is a stdlib, let's be a good citizen and annotate the types.
1 parent d3aa7e1 commit 43fb018

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/regioniterator.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function eachregion(s::AnnotatedString, region::UnitRange{Int}=firstindex(s):las
4646
for region in first.(s.annotations)) |>
4747
unique |> sort)
4848
isempty(changepoints) &&
49-
return RegionIterator(s.string, [region], [map(last, annotations(s, first(region)))])
49+
return RegionIterator(s.string, UnitRange{Int}[region], Vector{Pair{Symbol, Any}}[map(last, annotations(s, first(region)))])
5050
function registerchange!(start, stop)
5151
push!(regions, start:stop)
5252
push!(annots, map(last, annotations(s, start)))

0 commit comments

Comments
 (0)