summaryrefslogtreecommitdiff
path: root/misc/cgo/test/basic.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc/cgo/test/basic.go')
-rw-r--r--misc/cgo/test/basic.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/cgo/test/basic.go b/misc/cgo/test/basic.go
index 79cbf2b9c..019139d01 100644
--- a/misc/cgo/test/basic.go
+++ b/misc/cgo/test/basic.go
@@ -157,3 +157,8 @@ func testUnsignedInt(t *testing.T) {
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
+}