# Bug with new iteration code in parse

**URL:** <https://discourse.julialang.org/t/bug-with-new-iteration-code-in-parse/11034>\
**Category:** Internals & Design\
**Created:** [May 21, 2018, 3:34am UTC](https://discourse.julialang.org/t/bug-with-new-iteration-code-in-parse/11034 "2018-05-21T03:34:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [May 21, 2018, 3:34am UTC](https://discourse.julialang.org/t/bug-with-new-iteration-code-in-parse/11034/1 "2018-05-21T03:34:06Z")

</div>

`parse` is currently broken when trying do use an `AbstractString` whose `eltype` is not `Char`, but some other type of `AbstractChar`.  
The issue is that the code has a type assertion `::Tuple{Char,Int}` on the calls to `iterate`, instead of `::Tuple{eltype(s),Int}`.  
This breaks the [Strs.jl package](https://github.com/JuliaString/Strs.jl).

I have placed a fix in [https://github.com/ScottPJones/julia/tree/spj/fixparse](https://github.com/ScottPJones/julia/tree/spj/fixparse), if somebody can pull that in to julia as a PR.

Thanks!
