mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-01 23:45:50 +00:00
16d1d1e5eb
RPC binding config may be malformed or the source .go contract may contain structures like this: ``` type Str struct { Field int field int } ``` We need to recognise these cases and return error. otherwise the resulting binding can't be compiled. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
16 lines
261 B
Go
16 lines
261 B
Go
package invalid8
|
|
|
|
type SomeStruct struct {
|
|
Field int
|
|
// RPC binding generator will convert this field into exported, which matches
|
|
// exactly the existing Field.
|
|
field int
|
|
}
|
|
|
|
func Main() SomeStruct {
|
|
s := SomeStruct{
|
|
Field: 1,
|
|
field: 2,
|
|
}
|
|
return s
|
|
}
|