From e6ea6572634c94058b43760486bb239cfb033dd0 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Fri, 25 Sep 2026 13:41:49 +0700 Subject: [PATCH] The array literal given a slice type by the matches a read-only slice too --- lib/check.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/check.ml b/lib/check.ml index 3f2fcda1..a97daa0a 100644 --- a/lib/check.ml +++ b/lib/check.ml @@ -6564,7 +6564,7 @@ and check_the ctx ~want loc (t : Ast.texpr) (v : Ast.expr) = end; let r = match ty, v.Ast.e with - | Types.Slice elem, Ast.Arr items -> + | Types.Slice (_, elem), Ast.Arr items -> check_arr ctx ~want:(Some (Types.Array (Int64.of_int (List.length items), elem))) v.Ast.loc items