(e ast.Expr)
| 658 | } |
| 659 | |
| 660 | func maybeUnwrapString(e ast.Expr) (string, bool) { |
| 661 | switch e.Kind() { |
| 662 | case ast.LiteralKind: |
| 663 | literal := e.AsLiteral() |
| 664 | switch v := literal.(type) { |
| 665 | case types.String: |
| 666 | return string(v), true |
| 667 | } |
| 668 | } |
| 669 | return "", false |
| 670 | } |
| 671 | |
| 672 | func (c *checker) setType(e ast.Expr, t *types.Type) { |
| 673 | if old, found := c.TypeMap()[e.ID()]; found && !old.IsExactType(t) { |
no test coverage detected