fix: Fixed diagnostic issue with first/last in partials.

This commit is contained in:
Spencer Brower
2026-08-10 17:15:38 -04:00
parent 3cb20b55e8
commit 3551eb3b2c
2 changed files with 13 additions and 10 deletions
+3 -2
View File
@@ -460,14 +460,15 @@ take :: proc(
any,
Error,
) {
elem_info, count, data := list_info(value)
unwrapped, _ := base_value(value)
elem_info, count, data := list_info(unwrapped)
is_list := elem_info != nil
from_start := from_start
warning: Error = nil
str: string
if !is_list {
s, is_str := reflect.as_string(value)
s, is_str := reflect.as_string(unwrapped)
if !is_str {
return nil, Error_Body {
msg = "requires a list or string",