Russ Cox | d2cc988 | 2012-02-16 23:50:37 -0500 | [diff] [blame] | 1 | // errorcheck |
Russ Cox | 9a861b6 | 2009-05-08 16:40:55 -0700 | [diff] [blame] | 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 | |
Rob Pike | 501f0b5 | 2012-02-23 18:47:26 +1100 | [diff] [blame] | 7 | // Verify that import conflicts are detected by the compiler. |
| 8 | // Does not compile. |
Russ Cox | 9a861b6 | 2009-05-08 16:40:55 -0700 | [diff] [blame] | 9 | |
| 10 | package main |
| 11 | |
Ian Lance Taylor | 60f27f0 | 2010-02-01 16:35:23 -0800 | [diff] [blame] | 12 | import "bufio" // GCCGO_ERROR "previous|not used" |
Russ Cox | a5d7c1f | 2011-08-16 11:14:26 -0400 | [diff] [blame] | 13 | import bufio "os" // ERROR "redeclared|redefinition|incompatible" "imported and not used" |
Russ Cox | 38df5ec | 2009-08-19 15:18:08 -0700 | [diff] [blame] | 14 | |
Russ Cox | 9a861b6 | 2009-05-08 16:40:55 -0700 | [diff] [blame] | 15 | import ( |
Rob Pike | 4f61fc9 | 2010-09-04 10:36:13 +1000 | [diff] [blame] | 16 | "fmt" // GCCGO_ERROR "previous|not used" |
Russ Cox | 5be1821 | 2013-09-20 15:25:43 -0400 | [diff] [blame] | 17 | fmt "math" // ERROR "redeclared|redefinition|incompatible" "imported and not used: \x22math\x22 as fmt" |
Ian Lance Taylor | d270e6f2 | 2013-12-12 19:02:11 -0800 | [diff] [blame] | 18 | . "math" // GC_ERROR "imported and not used: \x22math\x22$" |
Robert Griesemer | 60d4e30 | 2009-12-10 11:25:54 -0800 | [diff] [blame] | 19 | ) |