File tree Expand file tree Collapse file tree 5 files changed +36
-0
lines changed
Filter options
go/ql/test/library-tests/semmle/go/Types Expand file tree Collapse file tree 5 files changed +36
-0
lines changed
Original file line number Diff line number Diff line change
1
+ | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.FirstAlias | string | string |
2
+ | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.SecondAlias | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.FirstAlias | string |
3
+ | internal/reflectlite.Kind | internal/abi.Kind | uint |
4
+ | internal/reflectlite.nameOff | internal/abi.NameOff | int32 |
5
+ | internal/reflectlite.textOff | internal/abi.TextOff | int32 |
6
+ | internal/reflectlite.typeOff | internal/abi.TypeOff | int32 |
7
+ | os.FileMode | io/fs.FileMode | uint32 |
8
+ | os.syscallErrorType | syscall.Errno | uintptr |
9
+ | reflect.aNameOff | internal/abi.NameOff | int32 |
10
+ | reflect.aTextOff | internal/abi.TextOff | int32 |
11
+ | reflect.aTypeOff | internal/abi.TypeOff | int32 |
12
+ | runtime.nameOff | internal/abi.NameOff | int32 |
13
+ | runtime.textOff | internal/abi.TextOff | int32 |
14
+ | runtime.typeOff | internal/abi.TypeOff | int32 |
Original file line number Diff line number Diff line change
1
+ import go
2
+
3
+ string getQualifiedNameIfExists ( Type t ) {
4
+ if exists ( t .getQualifiedName ( ) ) then result = t .getQualifiedName ( ) else result = t .getName ( )
5
+ }
6
+
7
+ from AliasType at
8
+ where at .hasLocationInfo ( _, _, _, _, _)
9
+ select getQualifiedNameIfExists ( at ) , getQualifiedNameIfExists ( at .getRhs ( ) ) ,
10
+ getQualifiedNameIfExists ( at .getUnderlyingType ( ) )
Original file line number Diff line number Diff line change
1
+ | aliases.go:3:6:3:15 | FirstAlias | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.FirstAlias |
2
+ | aliases.go:4:6:4:16 | SecondAlias | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.SecondAlias |
1
3
| cyclic.go:3:6:3:6 | s | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.s |
2
4
| cyclic.go:7:6:7:6 | t | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.t |
3
5
| cyclic.go:12:6:12:6 | u | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.u |
29
31
| generic.go:47:6:47:16 | MyInterface | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.MyInterface |
30
32
| generic.go:67:6:67:22 | HasBlankTypeParam | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.HasBlankTypeParam |
31
33
| generic.go:68:6:68:23 | HasBlankTypeParams | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.HasBlankTypeParams |
34
+ | generic.go:82:6:82:14 | TypeAlias | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.TypeAlias |
32
35
| generic.go:84:6:84:21 | GenericSignature | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.GenericSignature |
36
+ | generic.go:85:6:85:26 | GenericSignatureAlias | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.GenericSignatureAlias |
33
37
| interface.go:3:6:3:7 | i0 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.i0 |
34
38
| interface.go:5:6:5:7 | i1 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.i1 |
35
39
| interface.go:9:6:9:7 | i2 | github.com/github/codeql-go/ql/test/library-tests/semmle/go/Types.i2 |
Original file line number Diff line number Diff line change
1
+ | aliases.go:3:6:3:15 | FirstAlias | FirstAlias |
2
+ | aliases.go:4:6:4:16 | SecondAlias | SecondAlias |
1
3
| cyclic.go:3:6:3:6 | s | s |
2
4
| cyclic.go:7:6:7:6 | t | t |
3
5
| cyclic.go:12:6:12:6 | u | u |
29
31
| generic.go:47:6:47:16 | MyInterface | MyInterface |
30
32
| generic.go:67:6:67:22 | HasBlankTypeParam | HasBlankTypeParam |
31
33
| generic.go:68:6:68:23 | HasBlankTypeParams | HasBlankTypeParams |
34
+ | generic.go:82:6:82:14 | TypeAlias | TypeAlias |
32
35
| generic.go:84:6:84:21 | GenericSignature | GenericSignature |
36
+ | generic.go:85:6:85:26 | GenericSignatureAlias | GenericSignatureAlias |
33
37
| interface.go:3:6:3:7 | i0 | i0 |
34
38
| interface.go:5:6:5:7 | i1 | i1 |
35
39
| interface.go:9:6:9:7 | i2 | i2 |
Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ type FirstAlias = string
4
+ type SecondAlias = FirstAlias
You can’t perform that action at this time.
0 commit comments