From 2bcf3a4ad5c007e03beb6dcba5ce75a09100e44f Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 25 Nov 2022 13:01:57 +0300 Subject: [PATCH] compiler: unwrap pointers for debug types We have almost no difference between Type and *Type. --- pkg/compiler/debug.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/compiler/debug.go b/pkg/compiler/debug.go index efad1efc2..9785de401 100644 --- a/pkg/compiler/debug.go +++ b/pkg/compiler/debug.go @@ -339,7 +339,9 @@ func (c *codegen) scAndVMTypeFromType(t types.Type, exts map[string]binding.Exte return st, vt, over, et } } - + if ptr, isPtr := t.(*types.Pointer); isPtr { + t = ptr.Elem() + } var over binding.Override switch t := t.Underlying().(type) { case *types.Basic: