| 1 |
This file is identical to import-shadow.txtar except |
| 2 |
that the imports in a/a.go are not grouped. |
| 3 |
That is unusual, since goimports and related tools |
| 4 |
form groups. |
| 5 |
|
| 6 |
The result of inlining (bresult) also looks strange, |
| 7 |
but again, goimports would fix it up. |
| 8 |
|
| 9 |
-- go.mod -- |
| 10 |
module testdata |
| 11 |
go 1.12 |
| 12 |
|
| 13 |
-- a/a.go -- |
| 14 |
package a |
| 15 |
|
| 16 |
import "testdata/b" |
| 17 |
import "log" |
| 18 |
|
| 19 |
func A() { |
| 20 |
const log = "shadow" |
| 21 |
b.B() //@ inline(re"B", bresult) |
| 22 |
} |
| 23 |
|
| 24 |
var _ log.Logger |
| 25 |
|
| 26 |
-- b/b.go -- |
| 27 |
package b |
| 28 |
|
| 29 |
import "log" |
| 30 |
|
| 31 |
func B() { |
| 32 |
log.Printf("") |
| 33 |
} |
| 34 |
|
| 35 |
-- bresult -- |
| 36 |
package a |
| 37 |
|
| 38 |
import log0 "log" |
| 39 |
|
| 40 |
import "log" |
| 41 |
|
| 42 |
func A() { |
| 43 |
const log = "shadow" |
| 44 |
log0.Printf("") //@ inline(re"B", bresult) |
| 45 |
} |
| 46 |
|
| 47 |
var _ log.Logger |