compiler: handle ledger/management enums better for debug

Fix scAndVMInteropTypeFromExpr(), these types are not structures at all.
This commit is contained in:
Roman Khimov 2022-11-25 13:00:43 +03:00
parent 0f61a13006
commit d7fafea328

View file

@ -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}