Skip to content

Commit 681f9af

Browse files
committed
Fix MethodTypes test
1 parent 2561f3c commit 681f9af

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
| interface.go:101:6:101:8 | i19 | StringB | func() string |
3232
| interface.go:105:6:105:8 | i20 | StringB | func() string |
3333
| main.go:17:6:17:20 | EmbedsNameClash | NCMethod | func() |
34+
| pkg1/embedding.go:8:6:8:9 | base | f | func() int |
3435
| pkg1/embedding.go:19:6:19:13 | embedder | f | func() int |
3536
| pkg1/embedding.go:22:6:22:16 | ptrembedder | f | func() int |
3637
| pkg1/embedding.go:22:6:22:16 | ptrembedder | g | func() int |
3738
| pkg1/embedding.go:25:6:25:14 | embedder2 | f | func() int |
3839
| pkg1/embedding.go:28:6:28:14 | embedder3 | f | func() int |
39-
| pkg1/embedding.go:35:6:35:14 | embedder4 | f | func() int |
4040
| pkg1/interfaces.go:3:6:3:6 | A | m | func() |
4141
| pkg1/interfaces.go:7:6:7:6 | B | m | func() |
4242
| pkg1/interfaces.go:7:6:7:6 | B | n | func() |
@@ -51,10 +51,13 @@
5151
| pkg1/interfaces.go:31:6:31:7 | A2 | m | func() |
5252
| pkg1/interfaces.go:35:6:35:24 | MixedExportedAndNot | Exported | func() |
5353
| pkg1/interfaces.go:35:6:35:24 | MixedExportedAndNot | notExported | func() |
54+
| pkg1/promotedStructs.go:4:6:4:6 | S | SMethod | func() interface { } |
5455
| pkg1/promotedStructs.go:22:6:22:12 | SEmbedS | SMethod | func() interface { } |
5556
| pkg1/tst.go:5:6:5:6 | T | half | func() Foo |
5657
| pkg1/tst.go:16:6:16:7 | T3 | half | func() Foo |
5758
| pkg1/tst.go:21:6:21:7 | T4 | half | func() Foo |
59+
| pkg1/tst.go:26:6:26:8 | Foo | half | func() Foo |
5860
| pkg1/tst.go:61:6:61:14 | NameClash | NCMethod | func() |
5961
| pkg2/tst.go:11:6:11:24 | MixedExportedAndNot | Exported | func() |
6062
| pkg2/tst.go:11:6:11:24 | MixedExportedAndNot | notExported | func() |
63+
| pkg2/tst.go:16:6:16:14 | NameClash | NCMethod | func() |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import go
22

3-
from DefinedType t, string m, Type tp
3+
from Type t, string m, Type tp
44
where
55
exists(t.getEntity().getDeclaration()) and
6-
t.getBaseType().hasMethod(m, tp)
6+
t.hasMethod(m, tp)
77
select t, m, tp.pp()

0 commit comments

Comments
 (0)