base.ErrorfAt(ncase.Pos(), "%L is not a type", n1)
continue
}
- if !n1.Type().IsInterface() && !implements(n1.Type(), t, &missing, &have, &ptr) && !missing.Broke() {
- if have != nil && !have.Broke() {
+ if !n1.Type().IsInterface() && !implements(n1.Type(), t, &missing, &have, &ptr) {
+ if have != nil {
base.ErrorfAt(ncase.Pos(), "impossible type switch case: %L cannot have dynamic type %v"+
" (wrong type for %v method)\n\thave %v%S\n\twant %v%S", guard.X, n1.Type(), missing.Sym, have.Sym, have.Type, missing.Sym, missing.Type)
} else if ptr != 0 {
const (
fieldIsDDD = 1 << iota // field is ... argument
- fieldBroke // broken field definition
fieldNointerface
)
func (f *Field) IsDDD() bool { return f.flags&fieldIsDDD != 0 }
-func (f *Field) Broke() bool { return f.flags&fieldBroke != 0 }
func (f *Field) Nointerface() bool { return f.flags&fieldNointerface != 0 }
func (f *Field) SetIsDDD(b bool) { f.flags.set(fieldIsDDD, b) }
-func (f *Field) SetBroke(b bool) { f.flags.set(fieldBroke, b) }
func (f *Field) SetNointerface(b bool) { f.flags.set(fieldNointerface, b) }
// End returns the offset of the first byte immediately after this field.