1 package tests 2 3 //easyjson:json 4 type NamedType struct { 5 Inner struct { 6 // easyjson is mistakenly naming the type of this field 'tests.MyString' in the generated output 7 // something about a named type inside an anonmymous type is triggering this bug 8 Field MyString `tag:"value"` 9 Field2 int "tag:\"value with ` in it\"" 10 } 11 } 12 13 type MyString string 14 15 var namedTypeValue NamedType 16 17 func init() { 18 namedTypeValue.Inner.Field = "test" 19 namedTypeValue.Inner.Field2 = 123 20 } 21 22 var namedTypeValueString = `{"Inner":{"Field":"test","Field2":123}}` 23