Used to set placeholders to the desired typ.
(s typeCheckExprsState, typ *types.T)
| 2116 | |
| 2117 | // Used to set placeholders to the desired typ. |
| 2118 | func typeCheckSameTypedPlaceholders(s typeCheckExprsState, typ *types.T) error { |
| 2119 | for _, i := range s.placeholderIdxs { |
| 2120 | typedExpr, err := typeCheckAndRequire(s.ctx, s.semaCtx, s.exprs[i], typ, "placeholder") |
| 2121 | if err != nil { |
| 2122 | return err |
| 2123 | } |
| 2124 | s.typedExprs[i] = typedExpr |
| 2125 | } |
| 2126 | return nil |
| 2127 | } |
| 2128 | |
| 2129 | // Used to type check constants to the same type. An optional typ can be |
| 2130 | // provided to signify the desired shared type, which can be set to the |
no test coverage detected