You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
typedemostruct {
aintbint
}
funcmain() {
dem:=demo{
a: 1,
1, // mixture of field:value and value initializers
}
_=dem
}
Go reports this on the field that is initialized without the name in case there is a situation where a mixture is used. However I think the error should be applied to the struct initialization part not the fields.