From 66b6a27b09e6c08179256c87e1e16318b76bc0de Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Fri, 26 Jun 2020 12:08:59 +0300 Subject: [PATCH] compiler: fix DebugInfo JSON marshalling MethodDebugInfo.Parameters should be marshalled as `params` MethodDebugInfo.ReturnType --> `return` EventDebugInfo.Parameters --> `params` (see https://github.com/ngdseattle/design-notes/blob/master/NDX-DN11%20-%20NEO%20Debug%20Info%20Specification.md#v11-format) --- pkg/compiler/debug.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/compiler/debug.go b/pkg/compiler/debug.go index d24935b97..7747cae4f 100644 --- a/pkg/compiler/debug.go +++ b/pkg/compiler/debug.go @@ -33,7 +33,7 @@ type MethodDebugInfo struct { // Parameters is a list of method's parameters. Parameters []DebugParam `json:"params"` // ReturnType is method's return type. - ReturnType string `json:"return-type"` + ReturnType string `json:"return"` Variables []string `json:"variables"` // SeqPoints is a map between source lines and byte-code instruction offsets. SeqPoints []DebugSeqPoint `json:"sequence-points"` @@ -50,7 +50,7 @@ type EventDebugInfo struct { ID string `json:"id"` // Name is a human-readable event name in a format "{namespace}-{name}". Name string `json:"name"` - Parameters []DebugParam `json:"parameters"` + Parameters []DebugParam `json:"params"` } // DebugSeqPoint represents break-point for debugger.