8000 Update tests · github/codeql-go@25b91d8 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 25b91d8

Browse files
owen-mcsmowton
authored andcommitted
Update tests
1 parent 8c15199 commit 25b91d8

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

ql/test/library-tests/semmle/go/Types/GenericTypeInstantiationExpr.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
| generic.go:60:12:60:28 | generic type instantiation expression | generic.go:60:12:60:22 | GenericMap2 | 1 | generic.go:60:27:60:27 | U |
1515
| generic.go:61:12:61:28 | generic type instantiation expression | generic.go:61:12:61:25 | GenericChannel | 0 | generic.go:61:27:61:27 | U |
1616
| generic.go:62:12:62:26 | generic type instantiation expression | generic.go:62:12:62:23 | GenericNamed | 0 | generic.go:62:25:62:25 | U |
17+
| generic.go:70:42:70:64 | generic type instantiation expression | generic.go:70:42:70:57 | GenericInterface | 0 | generic.go:70:59:70:63 | int32 |
18+
| generic.go:74:41:74:62 | generic type instantiation expression | generic.go:74:41:74:54 | GenericStruct1 | 0 | generic.go:74:56:74:61 | string |

ql/test/library-tests/semmle/go/Types/SignatureType_getNumParameter.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
| depth.go:22:1:25:1 | function declaration | 0 |
2+
| generic.go:70:1:72:1 | function declaration | 1 |
3+
| generic.go:74:1:80:1 | function declaration | 1 |
24
| main.go:5:1:5:30 | function declaration | 1 |
35
| main.go:7:1:9:1 | function declaration | 2 |
46
| main.go:11:1:11:14 | function declaration | 0 |

ql/test/library-tests/semmle/go/Types/SignatureType_getNumResult.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
| depth.go:22:1:25:1 | function declaration | 0 |
2+
| generic.go:70:1:72:1 | function declaration | 1 |
3+
| generic.go:74:1:80:1 | function declaration | 0 |
24
| main.go:5:1:5:30 | function declaration | 0 |
35
| main.go:7:1:9:1 | function declaration | 2 |
46
| main.go:11:1:11:14 | function declaration | 0 |

ql/test/library-tests/semmle/go/Types/generic.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,15 @@ type MyInterface[U comparable] interface {
6666

6767
type HasBlankTypeParam[_ any] struct{}
6868
type HasBlankTypeParams[_ any, _ comparable, T ~string] struct{}
69+
70+
func callMethodOnInstantiatedInterface(x GenericInterface[int32]) int32 {
71+
return x.GetT()
72+
}
73+
74+
func accessFieldsOfInstantiatedStruct(x GenericStruct1[string]) {
75+
_ = x.valueField
76+
_ = x.pointerField
77+
_ = x.arrayField
78+
_ = x.sliceField
79+
_ = x.mapField
80+
}

0 commit comments

Comments
 (0)
0