OLD | NEW |
1 // errorcheck | 1 // errorcheck |
2 | 2 |
3 // Copyright 2009 The Go Authors. All rights reserved. | 3 // Copyright 2009 The Go Authors. All rights reserved. |
4 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
5 // license that can be found in the LICENSE file. | 5 // license that can be found in the LICENSE file. |
6 | 6 |
7 // check for import conflicts | 7 // Verify that import conflicts are detected by the compiler. |
| 8 // Does not compile. |
8 | 9 |
9 package main | 10 package main |
10 | 11 |
11 import "bufio" // GCCGO_ERROR "previous|not used" | 12 import "bufio" // GCCGO_ERROR "previous|not used" |
12 import bufio "os" // ERROR "redeclared|redefinition|incompatible" "importe
d and not used" | 13 import bufio "os" // ERROR "redeclared|redefinition|incompatible" "importe
d and not used" |
13 | 14 |
14 import ( | 15 import ( |
15 "fmt" // GCCGO_ERROR "previous|not used" | 16 "fmt" // GCCGO_ERROR "previous|not used" |
16 fmt "math" // ERROR "redeclared|redefinition|incompatible" "importe
d and not used" | 17 fmt "math" // ERROR "redeclared|redefinition|incompatible" "importe
d and not used" |
17 ) | 18 ) |
OLD | NEW |