1 // push needs a slice: the first argument supplies the element type. An untyped
2 // nil supplies none, and stage4 used to type the call untyped nil, default it
3 // to int32, and then emit either IR clang refuses (an i32 where a slice header
4 // belongs) or - in a short declaration - an empty slice with no error at all.
5 // Legacy rejects it, so this fixture must fail to compile with both compilers.
6 package main
7 8 func main() {
9 var b []string
10 b = push(nil, "y")
11 println("len", len(b))
12 }
13