Skip to content

Commit 4c5344d

Browse files
smowtonowen-mc
andcommitted
Accept test suggestions
Co-authored-by: Owen Mansel-Chan <[email protected]>
1 parent cbd129f commit 4c5344d

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
callTargets
2-
| test.go:41:2:41:24 | call to ImplementMe | test.go:12:1:12:69 | function declaration | ImplementMe |
3-
| test.go:41:2:41:24 | call to ImplementMe | test.go:17:1:17:64 | function declaration | ImplementMe |
4-
| test.go:41:2:41:24 | call to ImplementMe | test.go:24:1:24:53 | function declaration | ImplementMe |
5-
| test.go:41:2:41:24 | call to ImplementMe | test.go:31:1:31:59 | function declaration | ImplementMe |
6-
| test.go:41:2:41:24 | call to ImplementMe | test.go:38:1:38:71 | function declaration | ImplementMe |
2+
| test.go:48:2:48:24 | call to ImplementMe | test.go:12:1:12:69 | function declaration | ImplementMe |
3+
| test.go:48:2:48:24 | call to ImplementMe | test.go:17:1:17:64 | function declaration | ImplementMe |
4+
| test.go:48:2:48:24 | call to ImplementMe | test.go:24:1:24:53 | function declaration | ImplementMe |
5+
| test.go:48:2:48:24 | call to ImplementMe | test.go:31:1:31:59 | function declaration | ImplementMe |
6+
| test.go:48:2:48:24 | call to ImplementMe | test.go:38:1:38:71 | function declaration | ImplementMe |
7+
| test.go:48:2:48:24 | call to ImplementMe | test.go:45:1:45:69 | function declaration | ImplementMe |
78
#select
89
| file://:0:0:0:0 | basic interface type | file://:0:0:0:0 | basic interface type |
910
| file://:0:0:0:0 | basic interface type | test.go:10:6:10:10 | Impl1 |
1011
| file://:0:0:0:0 | basic interface type | test.go:15:6:15:10 | Impl2 |
1112
| file://:0:0:0:0 | basic interface type | test.go:20:6:20:10 | Impl3 |
1213
| file://:0:0:0:0 | basic interface type | test.go:27:6:27:10 | Impl4 |
1314
| file://:0:0:0:0 | basic interface type | test.go:34:6:34:10 | Impl5 |
15+
| file://:0:0:0:0 | basic interface type | test.go:41:6:41:10 | Impl6 |

go/ql/test/library-tests/semmle/go/aliases/InterfaceImpls/test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type Impl1 struct{}
1111

1212
func (recv Impl1) ImplementMe(callable func(struct{ x IntAlias })) {}
1313

14-
// Implementation via unalising
14+
// Implementation via unaliasing
1515
type Impl2 struct{}
1616

1717
func (recv Impl2) ImplementMe(callable func(struct{ x int })) {}
@@ -37,6 +37,13 @@ type Impl5Alias = IntAlias
3737

3838
func (recv Impl5) ImplementMe(callable func(struct{ x Impl5Alias })) {}
3939

40+
// Implementation via defining the method on an alias
41+
type Impl6 struct{}
42+
43+
type Impl6Alias = Impl6
44+
45+
func (recv Impl6Alias) ImplementMe(callable func(struct{ x int })) {}
46+
4047
func Caller(target Target) {
4148
target.ImplementMe(nil)
4249
}

0 commit comments

Comments
 (0)