MCPcopy Create free account
hub / github.com/despiteallobjections/amigo / exprWithHint

Method exprWithHint

types/expr.go:1789–1794  ·  view source on GitHub ↗

exprWithHint typechecks expression e and initializes x with the expression value; hint is the type of a composite literal element. If an error occurred, x.mode is set to invalid.

(x *operand, e Expr, hint Type)

Source from the content-addressed store, hash-verified

1787// If an error occurred, x.mode is set to invalid.
1788//
1789func (check *Checker) exprWithHint(x *operand, e Expr, hint Type) {
1790 assert(hint != nil)
1791 check.rawExpr(x, e, hint, false)
1792 check.exclude(x, 1<<novalue|1<<builtin|1<<typexpr)
1793 check.singleValue(x)
1794}
1795
1796// exprOrType typechecks expression or type e and initializes x with the expression value or type.
1797// If allowGeneric is set, the operand type may be an uninstantiated parameterized type or function

Callers 2

indexedEltsMethod · 0.95
exprInternalMethod · 0.95

Calls 4

rawExprMethod · 0.95
excludeMethod · 0.95
singleValueMethod · 0.95
assertFunction · 0.70

Tested by

no test coverage detected