# HG changeset patch # User Kim Alvefur # Date 1688130146 -7200 # Node ID e2c3582ab9fa966ed048872573370e6398c9b260 # Parent 082c7d856e61f7e698b8bd1f8a0d99019156f421 util.jsonpointer: Silence Teal warning It seems to think 'table' never has array items, but we don't know that. diff -r 082c7d856e61 -r e2c3582ab9fa teal-src/prosody/util/jsonpointer.tl --- a/teal-src/prosody/util/jsonpointer.tl Thu Jun 29 15:36:13 2023 +0100 +++ b/teal-src/prosody/util/jsonpointer.tl Fri Jun 30 15:02:26 2023 +0200 @@ -23,7 +23,7 @@ new_ref = ref[token] elseif idx is integer then local i = tonumber(token) - if token == "-" then i = #ref + 1 end + if token == "-" then i = #(ref as {any}) + 1 end new_ref = ref[i+1] else return nil, "invalid-table"