getErrorExprID determines which list literal argument triggered a type-disagreement for the purposes of more accurate error message reports.
(id int64, err error)
| 457 | // getErrorExprID determines which list literal argument triggered a type-disagreement for the |
| 458 | // purposes of more accurate error message reports. |
| 459 | func getErrorExprID(id int64, err error) int64 { |
| 460 | fmtErr, ok := err.(formatError) |
| 461 | if ok { |
| 462 | return fmtErr.id |
| 463 | } |
| 464 | wrapped := errors.Unwrap(err) |
| 465 | if wrapped != nil { |
| 466 | return getErrorExprID(id, wrapped) |
| 467 | } |
| 468 | return id |
| 469 | } |
| 470 | |
| 471 | // matchConstantFormatStringWithListLiteralArgs matches all valid expression nodes for string |
| 472 | // format checking. |