This repository was archived by the owner on Jan 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
ql/test/library-tests/semmle/go/Types Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11| cyclic.go:4:3:4:3 | s | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types |
2+ | cyclic.go:8:3:8:3 | u | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types |
3+ | cyclic.go:9:2:9:2 | f | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types |
4+ | cyclic.go:13:2:13:2 | t | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types |
5+ | depth.go:6:2:6:2 | b | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types |
6+ | depth.go:7:2:7:2 | c | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types |
7+ | depth.go:11:2:11:2 | f | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types |
8+ | depth.go:15:2:15:2 | d | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types |
9+ | depth.go:19:2:19:2 | f | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types |
210| pkg1/embedding.go:19:23:19:26 | base | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 |
311| pkg1/embedding.go:22:27:22:30 | base | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 |
412| pkg1/embedding.go:25:24:25:31 | embedder | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 |
Original file line number Diff line number Diff line change 11| cyclic.go:4:3:4:3 | s | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.s | s |
2+ | cyclic.go:8:3:8:3 | u | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.t | u |
3+ | cyclic.go:8:3:8:3 | u | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.u | u |
4+ | cyclic.go:9:2:9:2 | f | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.t | f |
5+ | cyclic.go:9:2:9:2 | f | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.u | f |
6+ | cyclic.go:13:2:13:2 | t | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.t | t |
7+ | cyclic.go:13:2:13:2 | t | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.u | t |
8+ | depth.go:6:2:6:2 | b | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.a | b |
9+ | depth.go:7:2:7:2 | c | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.a | c |
10+ | depth.go:11:2:11:2 | f | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.a | f |
11+ | depth.go:11:2:11:2 | f | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.b | f |
12+ | depth.go:15:2:15:2 | d | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.a | d |
13+ | depth.go:15:2:15:2 | d | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.c | d |
14+ | depth.go:19:2:19:2 | f | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.c | f |
15+ | depth.go:19:2:19:2 | f | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.d | f |
216| pkg1/embedding.go:19:23:19:26 | base | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.embedder | base |
317| pkg1/embedding.go:19:23:19:26 | base | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.embedder2 | base |
418| pkg1/embedding.go:19:23:19:26 | base | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.embedder3 | base |
Original file line number Diff line number Diff line change 11| cyclic.go:4:3:4:3 | s | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | s | s |
2+ | cyclic.go:8:3:8:3 | u | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | t | u |
3+ | cyclic.go:8:3:8:3 | u | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | u | u |
4+ | cyclic.go:9:2:9:2 | f | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | t | f |
5+ | cyclic.go:9:2:9:2 | f | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | u | f |
6+ | cyclic.go:13:2:13:2 | t | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | t | t |
7+ | cyclic.go:13:2:13:2 | t | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | u | t |
8+ | depth.go:6:2:6:2 | b | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | a | b |
9+ | depth.go:7:2:7:2 | c | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | a | c |
10+ | depth.go:11:2:11:2 | f | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | a | f |
11+ | depth.go:11:2:11:2 | f | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | b | f |
12+ | depth.go:15:2:15:2 | d | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | a | d |
13+ | depth.go:15:2:15:2 | d | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | c | d |
14+ | depth.go:19:2:19:2 | f | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | c | f |
15+ | depth.go:19:2:19:2 | f | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types | d | f |
216| pkg1/embedding.go:19:23:19:26 | base | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | embedder | base |
317| pkg1/embedding.go:19:23:19:26 | base | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | embedder2 | base |
418| pkg1/embedding.go:19:23:19:26 | base | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1 | embedder3 | base |
Original file line number Diff line number Diff line change 1313| T2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T2 |
1414| T3 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T3 |
1515| T4 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.T4 |
16+ | a | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.a |
17+ | b | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.b |
1618| base | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.base |
19+ | c | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.c |
20+ | d | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.d |
1721| embedder | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.embedder |
1822| embedder2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.embedder2 |
1923| embedder3 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.embedder3 |
2024| embedder4 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.embedder4 |
2125| ptrembedder | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types/pkg1.ptrembedder |
2226| s | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.s |
27+ | t | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.t |
28+ | u | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.u |
Original file line number Diff line number Diff line change 1+ | depth.go:22:1:25:1 | function declaration | 0 |
12| main.go:5:1:5:30 | function declaration | 1 |
23| main.go:7:1:9:1 | function declaration | 2 |
34| main.go:11:1:11:14 | function declaration | 0 |
Original file line number Diff line number Diff line change 1+ | depth.go:22:1:25:1 | function declaration | 1 |
12| main.go:5:1:5:30 | function declaration | 0 |
23| main.go:7:1:9:1 | function declaration | 2 |
34| main.go:11:1:11:14 | function declaration | 0 |
Original file line number Diff line number Diff line change 1919| T4 | pkg1/tst.go:19:9:22:1 | struct type | Foo | * Foo |
2020| T4 | pkg1/tst.go:19:9:22:1 | struct type | flag | bool |
2121| T4 | pkg1/tst.go:19:9:22:1 | struct type | val | int |
22+ | a | depth.go:5:8:8:1 | struct type | b | b |
23+ | a | depth.go:5:8:8:1 | struct type | c | c |
24+ | a | depth.go:5:8:8:1 | struct type | d | d |
25+ | a | depth.go:5:8:8:1 | struct type | f | int |
26+ | b | depth.go:10:8:12:1 | struct type | f | int |
27+ | c | depth.go:14:8:16:1 | struct type | d | d |
28+ | c | depth.go:14:8:16:1 | struct type | f | string |
29+ | d | depth.go:18:8:20:1 | struct type | f | string |
2230| embedder | pkg1/embedding.go:19:15:19:28 | struct type | base | base |
2331| embedder2 | pkg1/embedding.go:25:16:25:33 | struct type | base | base |
2432| embedder2 | pkg1/embedding.go:25:16:25:33 | struct type | embedder | embedder |
3240| embedder4 | pkg1/embedding.go:35:16:38:1 | struct type | f | int |
3341| ptrembedder | pkg1/embedding.go:22:18:22:32 | struct type | base | * base |
3442| s | cyclic.go:3:8:5:1 | struct type | s | * s |
43+ | t | cyclic.go:7:8:10:1 | struct type | f | int |
44+ | t | cyclic.go:7:8:10:1 | struct type | t | t |
45+ | t | cyclic.go:7:8:10:1 | struct type | u | * u |
46+ | u | cyclic.go:12:8:14:1 | struct type | f | int |
47+ | u | cyclic.go:12:8:14:1 | struct type | t | t |
48+ | u | cyclic.go:12:8:14:1 | struct type | u | * u |
Original file line number Diff line number Diff line change 1313| T2 | T2 |
1414| T3 | T3 |
1515| T4 | T4 |
16+ | a | a |
17+ | b | b |
1618| base | base |
19+ | c | c |
20+ | d | d |
1721| embedder | embedder |
1822| embedder2 | embedder2 |
1923| embedder3 | embedder3 |
2024| embedder4 | embedder4 |
2125| ptrembedder | ptrembedder |
2226| s | s |
27+ | t | t |
28+ | u | u |
Original file line number Diff line number Diff line change @@ -3,3 +3,12 @@ package main
33type s struct {
44 * s
55}
6+
7+ type t struct {
8+ * u
9+ f int
10+ }
11+
12+ type u struct {
13+ t
14+ }
Original file line number Diff line number Diff line change 1+ package main
2+
3+ import "fmt"
4+
5+ type a struct {
6+ b // we get f from here
7+ c // but not from here because it is nested more deeply
8+ }
9+
10+ type b struct {
11+ f int
12+ }
13+
14+ type c struct {
15+ d
16+ }
17+
18+ type d struct {
19+ f string
20+ }
21+
22+ func test2 () int {
23+ x := a {b {0 }, c {d {"hi" }}}
24+ fmt .Printf ("%v" , x .f ) // prints `0`, not `"hi"`
25+ }
You can’t perform that action at this time.
0 commit comments