The array literal given a slice type by the matches a read-only slice too
This commit is contained in:
parent
b2eb81f7bf
commit
e6ea657263
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user