Debian Codegraph @

internal/refactor/inline/testdata/revdotimport.txtar

raw
1 Test of inlining a function into a context that already
2 dot-imports the necessary additional import.
3
4 -- go.mod --
5 module testdata
6 go 1.12
7
8 -- a/a.go --
9 package a
10
11 func A() {}
12
13 -- b/b.go --
14 package b
15
16 import "testdata/a"
17
18 func B() { a.A() }
19
20 -- c/c.go --
21 package c
22
23 import . "testdata/a"
24 import "testdata/b"
25
26 func _() {
27 A()
28 b.B() //@ inline(re"B", result)
29 }
30
31 -- result --
32 package c
33
34 import "testdata/a"
35
36 import . "testdata/a"
37
38 func _() {
39 A()
40 a.A() //@ inline(re"B", result)
41 }