If typ is a type parameter, underIs returns the result of typ.underIs(f). Otherwise, underIs returns the result of f(under(typ)).
(typ Type, f func(Type) bool)
| 157 | // If typ is a type parameter, underIs returns the result of typ.underIs(f). |
| 158 | // Otherwise, underIs returns the result of f(under(typ)). |
| 159 | func underIs(typ Type, f func(Type) bool) bool { |
| 160 | if tpar, _ := typ.(*TypeParam); tpar != nil { |
| 161 | return tpar.underIs(f) |
| 162 | } |
| 163 | return f(under(typ)) |
| 164 | } |
| 165 | |
| 166 | func (check *Checker) unary(x *operand, e *Operation) { |
| 167 | check.expr(x, e.X) |