blob: 2433b5f2ad2b479a5346a721289f4e140dc2a234 [file] [log] [blame]
Russ Coxd2cc9882012-02-16 23:50:37 -05001// errorcheck
Russ Cox9a861b62009-05-08 16:40:55 -07002
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 Pike501f0b52012-02-23 18:47:26 +11007// Verify that import conflicts are detected by the compiler.
8// Does not compile.
Russ Cox9a861b62009-05-08 16:40:55 -07009
10package main
11
Ian Lance Taylor60f27f02010-02-01 16:35:23 -080012import "bufio" // GCCGO_ERROR "previous|not used"
Russ Coxa5d7c1f2011-08-16 11:14:26 -040013import bufio "os" // ERROR "redeclared|redefinition|incompatible" "imported and not used"
Russ Cox38df5ec2009-08-19 15:18:08 -070014
Russ Cox9a861b62009-05-08 16:40:55 -070015import (
Rob Pike4f61fc92010-09-04 10:36:13 +100016 "fmt" // GCCGO_ERROR "previous|not used"
Russ Cox5be18212013-09-20 15:25:43 -040017 fmt "math" // ERROR "redeclared|redefinition|incompatible" "imported and not used: \x22math\x22 as fmt"
Ian Lance Taylord270e6f22013-12-12 19:02:11 -080018 . "math" // GC_ERROR "imported and not used: \x22math\x22$"
Robert Griesemer60d4e302009-12-10 11:25:54 -080019)