mirror of https://github.com/kubernetes/kops.git
Merge pull request #16902 from justinsb/fix_method_matching_render
chore: fix method-matching on Render method
This commit is contained in:
commit
b44e9ab488
|
@ -209,14 +209,14 @@ func (c *Context[T]) Render(a, e, changes Task[T]) error {
|
|||
var args []reflect.Value
|
||||
for j := 0; j < method.Type.NumIn(); j++ {
|
||||
arg := method.Type.In(j)
|
||||
if arg.ConvertibleTo(vType) {
|
||||
if vType.ConvertibleTo(arg) {
|
||||
continue
|
||||
}
|
||||
if arg.ConvertibleTo(typeContextPtr) {
|
||||
if typeContextPtr.ConvertibleTo(arg) {
|
||||
args = append(args, reflect.ValueOf(c))
|
||||
continue
|
||||
}
|
||||
if arg.ConvertibleTo(targetType) {
|
||||
if targetType.ConvertibleTo(arg) {
|
||||
args = append(args, reflect.ValueOf(c.Target))
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue