Description

The MakeSlice instruction yields a slice of length Len backed by a newly allocated array of length Cap.

Both Len and Cap must be non-nil Values of integer type.

(Alloc(types.Array) followed by Slice will not suffice because Alloc can only create arrays of constant length.)

Type() returns a (possibly named) *types.Slice.

Pos() returns the ast.CallExpr.Lparen for the make([]T) that created it.

Example printed form:

t1 = make []string 1:int t0
t1 = make StringSlice 1:int t0