From d7fafea328df511f7686e0562211ab93fed55d35 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 25 Nov 2022 13:00:43 +0300 Subject: [PATCH] compiler: handle ledger/management enums better for debug Fix scAndVMInteropTypeFromExpr(), these types are not structures at all. --- pkg/compiler/debug.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/compiler/debug.go b/pkg/compiler/debug.go index dc712697d..efad1efc2 100644 --- a/pkg/compiler/debug.go +++ b/pkg/compiler/debug.go @@ -274,6 +274,10 @@ func scAndVMInteropTypeFromExpr(named *types.Named, isPointer bool) (smartcontra pkg := named.Obj().Pkg().Name() switch pkg { case "ledger", "management": + switch name { + case "ParameterType", "SignerScope", "WitnessAction", "WitnessConditionType", "VMState": + return smartcontract.IntegerType, stackitem.IntegerT, binding.Override{TypeName: "int"}, nil + } // Block, Transaction, Contract. typeName := pkg + "." + name et := &binding.ExtendedType{Base: smartcontract.ArrayType, Name: typeName}