The UnOp instruction yields the result of Op X. ARROW is channel receive. MUL is pointer indirection (load). XOR is bitwise complement. SUB is negation. NOT is logical negation.

If CommaOk and Op=ARROW, the result is a 2-tuple of the value above and a boolean indicating the success of the receive. The components of the tuple are accessed using Extract.

Pos() returns the ast.UnaryExpr.OpPos, if explicit in the source. For receive operations (ARROW) implicit in ranging over a channel, Pos() returns the ast.RangeStmt.For. For implicit memory loads (STAR), Pos() returns the position of the most closely associated source-level construct; the details are not specified.

Example printed form:

t0 = *x
t2 = <-t1,ok