Debian Codegraph @

gcc/testsuite/go.test/test/import4.dir/import4.go

raw
1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Verify that various kinds of "imported and not used"
6 // errors are caught by the compiler.
7 // Does not compile.
8
9 package main
10
11 // standard
12 import "fmt" // ERROR "imported and not used.*fmt"
13
14 // renamed
15 import X "math" // ERROR "imported and not used.*math"
16
17 // import dot
18 import . "bufio" // ERROR "imported and not used.*bufio"
19
20 // again, package without anything in it
21 import "./empty" // ERROR "imported and not used.*empty"
22 import Z "./empty" // ERROR "imported and not used.*empty"
23 import . "./empty" // ERROR "imported and not used.*empty"
24