Skip to content

Commit b2c0cb1

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

File tree

1 file changed

+8
-1
lines changed
  • go/ql/test/library-tests/semmle/go/aliases/InterfaceImpls

1 file changed

+8
-1
lines changed

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)