Skip to content

Commit

Permalink
Fix show_src_expr on 32 bit Julia
Browse files Browse the repository at this point in the history
`_lastidx` is a `UInt32`, so the result of `catchup` ends up a `UInt32`. This then gets assigned to `position` (line 80) which is expected to be an `Int`.
I didn't convert `_lastidx` to an `Int` because I thought converting the return value might minimise the chances of an InexactError.
  • Loading branch information
Zentrik committed Jan 7, 2024
1 parent 6c96853 commit 03c0c85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TypedSyntax/src/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function show_src_expr(io::IO, node::MaybeTypedSyntaxNode, position::Int, pre::S
position = show_src_expr(io, child, position, cpre, cpre2; type_annotations, iswarn, hide_type_stable, nd)
ctype_annotate && show_annotation(io, cT, cpost, node.source, position; iswarn)
end
return catchup(io, node, position, nd, _lastidx+1)
return Int(catchup(io, node, position, nd, _lastidx+1))
end

# should we print a type-annotation?
Expand Down

0 comments on commit 03c0c85

Please sign in to comment.