File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
go/ql/test/library-tests/semmle/go/aliases/InterfaceImpls Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type Impl1 struct{}
11
11
12
12
func (recv Impl1 ) ImplementMe (callable func (struct { x IntAlias })) {}
13
13
14
- // Implementation via unalising
14
+ // Implementation via unaliasing
15
15
type Impl2 struct {}
16
16
17
17
func (recv Impl2 ) ImplementMe (callable func (struct { x int })) {}
@@ -37,6 +37,13 @@ type Impl5Alias = IntAlias
37
37
38
38
func (recv Impl5 ) ImplementMe (callable func (struct { x Impl5Alias })) {}
39
39
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
+
40
47
func Caller (target Target ) {
41
48
target .ImplementMe (nil )
42
49
}
You can’t perform that action at this time.
0 commit comments