From 31e3793202402fda21905027c18ebfa5c8d8c832 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Wed, 14 Jan 2026 18:44:17 +0100 Subject: fix: improve handling of indirections Added 2 VM instructions, FnewE variant of Fnew with a dereference, and FieldE, variant of Field with dereference. It's now possible to pointers in structs and literal composites. --- vm/type.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vm/type.go') diff --git a/vm/type.go b/vm/type.go index 88e3dc0..58b6c46 100644 --- a/vm/type.go +++ b/vm/type.go @@ -132,3 +132,6 @@ func (t *Type) FieldType(name string) *Type { } return nil } + +// IsPtr returns true if type t is of pointer kind. +func (t *Type) IsPtr() bool { return t.Rtype.Kind() == reflect.Pointer } -- cgit v1.2.3