File tree Expand file tree Collapse file tree 5 files changed +29
-1
lines changed Expand file tree Collapse file tree 5 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 1- go 1.14
1+ go 1.18
22
33module testsample
Original file line number Diff line number Diff line change 1+ package pkg1
2+
3+ type Generic [T any ] struct {
4+ element T
5+ }
6+
7+ func TestMe () { }
Original file line number Diff line number Diff line change 1+ package pkg1
2+
3+ func UsePkg1 () {
4+ TestMe ()
5+ }
Original file line number Diff line number Diff line change 1+ package pkg2
2+
3+ import (
4+ "testsample/pkg1"
5+ )
6+
7+ // This tests the case of cross-package generic type references
8+ // in the presence of test extraction. We need to make sure we
9+ // extract packages, including test variants, in the right order
10+ // such that we've seen pkg1.Generic before we try to use it here.
11+
12+ type Specialised = pkg1.Generic [string ]
Original file line number Diff line number Diff line change 11#select
2+ | src/pkg1/def.go:0:0:0:0 | src/pkg1/def.go |
3+ | src/pkg1/def_test.go:0:0:0:0 | src/pkg1/def_test.go |
4+ | src/pkg2/use.go:0:0:0:0 | src/pkg2/use.go |
25| src/testme.go:0:0:0:0 | src/testme.go |
36| src/testme_blackbox_test.go:0:0:0:0 | src/testme_blackbox_test.go |
47| src/testme_test.go:0:0:0:0 | src/testme_test.go |
58calls
9+ | src/pkg1/def_test.go:4:2:4:9 | call to TestMe | src/pkg1/def.go:7:1:7:17 | function declaration |
610| src/testme_blackbox_test.go:10:18:10:44 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration |
711| src/testme_test.go:9:18:9:33 | call to PublicFunction | src/testme.go:3:1:3:38 | function declaration |
812| src/testme_test.go:14:19:14:35 | call to privateFunction | src/testme.go:5:1:5:39 | function declaration |
You can’t perform that action at this time.
0 commit comments