Summary: | Array trim has invalid type | ||
---|---|---|---|
Product: | poke | Reporter: | Mohammad-Reza Nabipoor <mnabipoor> |
Component: | default | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jose.marchesi, poke-devel |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | 2020-08-21 00:00:00 |
Description
Mohammad-Reza Nabipoor
2020-08-21 07:56:50 UTC
Hi Mohammad. Thanks for the report. This looks like a bug. The type of an array trim should be, generally, an unbounded array type having the same base type than the original array. So in: defvar a = [1,2,3] defvar b = a[0:1] The type of `a' is int<32>[3] The type of `b' is int<32>[] This is fixed in master with commit commit 3cca7544d54eb7e45e0e1fc1a160bc0263391ced (HEAD -> master, origin/master, origin/HEAD) Author: Jose E. Marchesi <jose.marchesi@oracle.com> Date: Fri Aug 21 11:34:00 2020 +0200 typify: the types of trimmed arrays are unbounded 2020-08-21 Jose E. Marchesi <jemarch@gnu.org> * libpoke/pkl-typify.c (pkl_typify1_ps_trimmer): The type of a trimmed array is unbounded. * testsuite/poke.pkl/trim-26.pk: New test. |