From 03c0c852c63acd9639a905fbd3c20a81925b3b80 Mon Sep 17 00:00:00 2001 From: Zentrik Date: Tue, 2 Jan 2024 10:14:57 +0000 Subject: [PATCH] Fix show_src_expr on 32 bit Julia `_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. --- TypedSyntax/src/show.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TypedSyntax/src/show.jl b/TypedSyntax/src/show.jl index 099b8985..f3bfbe05 100644 --- a/TypedSyntax/src/show.jl +++ b/TypedSyntax/src/show.jl @@ -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?