mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
Expand test for Extract Tuple Instruction
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
| test.go:9:2:9:16 | ... := ...[0] | file://:0:0:0:0 | bool |
|
||||
| test.go:9:2:9:16 | ... := ...[1] | file://:0:0:0:0 | bool |
|
||||
| test.go:15:2:15:20 | ... := ...[0] | file://:0:0:0:0 | string |
|
||||
| test.go:15:2:15:20 | ... := ...[1] | file://:0:0:0:0 | bool |
|
||||
| test.go:21:2:21:22 | ... := ...[0] | file://:0:0:0:0 | string |
|
||||
| test.go:21:2:21:22 | ... := ...[1] | file://:0:0:0:0 | bool |
|
||||
| test.go:9:2:9:16 | ... := ...[0] | test.go:9:13:9:16 | <-... | 0 | file://:0:0:0:0 | bool |
|
||||
| test.go:9:2:9:16 | ... := ...[1] | test.go:9:13:9:16 | <-... | 1 | file://:0:0:0:0 | bool |
|
||||
| test.go:15:2:15:20 | ... := ...[0] | test.go:15:13:15:20 | index expression | 0 | file://:0:0:0:0 | string |
|
||||
| test.go:15:2:15:20 | ... := ...[1] | test.go:15:13:15:20 | index expression | 1 | file://:0:0:0:0 | bool |
|
||||
| test.go:21:2:21:22 | ... := ...[0] | test.go:21:13:21:22 | type assertion | 0 | file://:0:0:0:0 | string |
|
||||
| test.go:21:2:21:22 | ... := ...[1] | test.go:21:13:21:22 | type assertion | 1 | file://:0:0:0:0 | bool |
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import go
|
||||
|
||||
from IR::ExtractTupleElementInstruction extract
|
||||
select extract, extract.getResultType()
|
||||
from IR::ExtractTupleElementInstruction extract, IR::Instruction base, int idx, Type resultType
|
||||
where extract.extractsElement(base, idx) and resultType = extract.getResultType()
|
||||
select extract, base, idx, resultType
|
||||
|
||||
Reference in New Issue
Block a user