Skip to content

Commit b064911

Browse files
committed
Expand test for Extract Tuple Instruction
1 parent c608a90 commit b064911

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
| test.go:9:2:9:16 | ... := ...[0] | file://:0:0:0:0 | bool |
2-
| test.go:9:2:9:16 | ... := ...[1] | file://:0:0:0:0 | bool |
3-
| test.go:15:2:15:20 | ... := ...[0] | file://:0:0:0:0 | string |
4-
| test.go:15:2:15:20 | ... := ...[1] | file://:0:0:0:0 | bool |
5-
| test.go:21:2:21:22 | ... := ...[0] | file://:0:0:0:0 | string |
6-
| test.go:21:2:21:22 | ... := ...[1] | file://:0:0:0:0 | bool |
1+
| test.go:9:2:9:16 | ... := ...[0] | test.go:9:13:9:16 | <-... | 0 | file://:0:0:0:0 | bool |
2+
| test.go:9:2:9:16 | ... := ...[1] | test.go:9:13:9:16 | <-... | 1 | file://:0:0:0:0 | bool |
3+
| test.go:15:2:15:20 | ... := ...[0] | test.go:15:13:15:20 | index expression | 0 | file://:0:0:0:0 | string |
4+
| test.go:15:2:15:20 | ... := ...[1] | test.go:15:13:15:20 | index expression | 1 | file://:0:0:0:0 | bool |
5+
| test.go:21:2:21:22 | ... := ...[0] | test.go:21:13:21:22 | type assertion | 0 | file://:0:0:0:0 | string |
6+
| test.go:21:2:21:22 | ... := ...[1] | test.go:21:13:21:22 | type assertion | 1 | file://:0:0:0:0 | bool |
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import go
22

3-
from IR::ExtractTupleElementInstruction extract
4-
select extract, extract.getResultType()
3+
from IR::ExtractTupleElementInstruction extract, IR::Instruction base, int idx, Type resultType
4+
where extract.extractsElement(base, idx) and resultType = extract.getResultType()
5+
select extract, base, idx, resultType

0 commit comments

Comments
 (0)