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

Method exprOrType

types/expr.go:1801–1805  ·  view source on GitHub ↗

exprOrType typechecks expression or type e and initializes x with the expression value or type. If allowGeneric is set, the operand type may be an uninstantiated parameterized type or function value. If an error occurred, x.mode is set to invalid.

(x *operand, e Expr, allowGeneric bool)

Source from the content-addressed store, hash-verified

1799// If an error occurred, x.mode is set to invalid.
1800//
1801func (check *Checker) exprOrType(x *operand, e Expr, allowGeneric bool) {
1802 check.rawExpr(x, e, nil, allowGeneric)
1803 check.exclude(x, 1<<novalue)
1804 check.singleValue(x)
1805}
1806
1807// exclude reports an error if x.mode is in modeset and sets x.mode to invalid.
1808// The modeset may contain any of 1<<novalue, 1<<builtin, 1<<typexpr.

Callers 4

indexExprMethod · 0.95
exprInternalMethod · 0.95
callExprMethod · 0.95
selectorMethod · 0.95

Calls 3

rawExprMethod · 0.95
excludeMethod · 0.95
singleValueMethod · 0.95

Tested by

no test coverage detected