diff options
Diffstat (limited to 'test/const5.go')
-rw-r--r-- | test/const5.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/const5.go b/test/const5.go index 87fe33a38..60b4d0d12 100644 --- a/test/const5.go +++ b/test/const5.go @@ -18,6 +18,7 @@ var s [][30]int func f() *[40]int var c chan *[50]int +var z complex128 const ( n1 = len(b.a) @@ -29,5 +30,8 @@ const ( n6 = cap(f()) // ERROR "is not a constant|is not constant" n7 = cap(<-c) // ERROR "is not a constant|is not constant" + n8 = real(z) // ERROR "is not a constant|is not constant" + n9 = len([4]float64{real(z)}) // ERROR "is not a constant|is not constant" + ) |