+ static test
NB: there's a preexisting (dynamic) failure of test issue7978.go.
LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/
144650045
t.Errorf("Incorrect unsigned int - got %x, want %x", a, b)
}
}
+
+// Static (build-time) test that syntax traversal visits all operands of s[i:j:k].
+func sliceOperands(array [2000]int) {
+ _ = array[C.KILO:C.KILO:C.KILO] // no type error
+}
if n.High != nil {
f.walk(&n.High, "expr", visit)
}
+ if n.Max != nil {
+ f.walk(&n.Max, "expr", visit)
+ }
case *ast.TypeAssertExpr:
f.walk(&n.X, "expr", visit)
f.walk(&n.Type, "type", visit)