canConstantBecome returns whether the provided Constant can become resolved as the provided type.
(c Constant, typ *types.T)
| 95 | // canConstantBecome returns whether the provided Constant can become resolved |
| 96 | // as the provided type. |
| 97 | func canConstantBecome(c Constant, typ *types.T) bool { |
| 98 | avail := c.AvailableTypes() |
| 99 | for _, availTyp := range avail { |
| 100 | if availTyp.Equivalent(typ) { |
| 101 | return true |
| 102 | } |
| 103 | } |
| 104 | return false |
| 105 | } |
| 106 | |
| 107 | // NumVal represents a constant numeric value. |
| 108 | type NumVal struct { |
no test coverage detected
searching dependent graphs…