Source file test/import4.dir/import4.go

     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|\x22fmt\x22 imported and not used"
    13  
    14  // renamed
    15  import X "math"	// ERROR "imported and not used.*math|\x22math\x22 imported as X and not used"
    16  
    17  // import dot
    18  import . "bufio"	// ERROR "imported and not used.*bufio|imported and not used"
    19  
    20  // again, package without anything in it
    21  import "./empty"	// ERROR "imported and not used.*empty|imported and not used"
    22  import Z "./empty"	// ERROR "imported and not used.*empty|imported as Z and not used"
    23  import . "./empty"	// ERROR "imported and not used.*empty|imported and not used"
    24  
    25  

View as plain text