-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
duplicate_signature_overlapping_context.yml
37 lines (33 loc) · 1.48 KB
/
duplicate_signature_overlapping_context.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
input:
input.go: |
package structs
// goverter:converter
type Converter interface {
// goverter:context ctxI
// goverter:context ctxS
Convert(source Input, ctxI int, ctxS string) Output
// goverter:context ctxI
Convert2(source Input, ctxI int) Output
}
type Input struct {
ID int
Age int
}
type Output struct {
ID int
Age string
}
error: |-
Overlapping signatures found. All sources and contexts of this method
func (github.com/jmattheis/goverter/execution.Converter).Convert2(source github.com/jmattheis/goverter/execution.Input, ctxI int) github.com/jmattheis/goverter/execution.Output
[source] github.com/jmattheis/goverter/execution.Input
[context] int
[target] github.com/jmattheis/goverter/execution.Output
are contained in method
func (github.com/jmattheis/goverter/execution.Converter).Convert(source github.com/jmattheis/goverter/execution.Input, ctxI int, ctxS string) github.com/jmattheis/goverter/execution.Output
[source] github.com/jmattheis/goverter/execution.Input
[context] int
[context] string
[target] github.com/jmattheis/goverter/execution.Output
Goverter doesn't know which method to use when all contexts of the second method are available.
Remove one of the methods to prevent this ambiguity.