From 74a642c5aad99f6d9f5c041eb2b14fac96eb1732 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Tue, 30 Sep 2014 16:08:04 -0400 Subject: cmd/cgo: add missing ast.SliceExpr.Max case to AST traversal. + static test NB: there's a preexisting (dynamic) failure of test issue7978.go. LGTM=iant R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/144650045 --- misc/cgo/test/basic.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'misc') 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 +} -- cgit v1.2.1