]> Cypherpunks.ru repositories - gostls13.git/blob - test/assign.go
Adjust expected errors to work with gccgo.
[gostls13.git] / test / assign.go
1 // errchk $G $D/$F.go
2
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.
6
7 package main
8
9 import "sync"
10
11 type T struct {
12         int;
13         sync.Mutex;
14 }
15
16 func main() {
17         {
18                 var x, y sync.Mutex;
19                 x = y;  // ERROR "assignment\[ -~\]*Mutex"
20         }
21         {
22                 var x, y T;
23                 x = y;  // ERROR "assignment\[ -~\]*Mutex"
24         }
25         {
26                 var x, y [2]sync.Mutex;
27                 x = y;  // ERROR "assignment\[ -~\]*Mutex"
28         }
29         {
30                 var x, y [2]T;
31                 x = y;  // ERROR "assignment\[ -~\]*Mutex"
32         }
33 }