Index: misc/cgo/test/basic.go |
=================================================================== |
--- a/misc/cgo/test/basic.go |
+++ b/misc/cgo/test/basic.go |
@@ -157,3 +157,8 @@ |
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 |
+} |