Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / go.test / test / convert3.go
blobbe68c95b36207e4278ebbde3e3045efb1f127eb4
1 // errchk $G $D/$F.go
3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 package main
9 // everything here is legal except the ERROR line
11 var c chan int
12 var d1 chan<- int = c
13 var d2 = (chan<- int)(c)
15 var e *[4]int
16 var f1 []int = e[0:]
17 var f2 = []int(e[0:])
19 var g = []int(nil)
21 type H []int
22 type J []int
24 var h H
25 var j1 J = h // ERROR "compat|illegal|cannot"
26 var j2 = J(h)