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
|
var args []reflect.Value
|
||||||
for j := 0; j < method.Type.NumIn(); j++ {
|
for j := 0; j < method.Type.NumIn(); j++ {
|
||||||
arg := method.Type.In(j)
|
arg := method.Type.In(j)
|
||||||
if arg.ConvertibleTo(vType) {
|
if vType.ConvertibleTo(arg) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if arg.ConvertibleTo(typeContextPtr) {
|
if typeContextPtr.ConvertibleTo(arg) {
|
||||||
args = append(args, reflect.ValueOf(c))
|
args = append(args, reflect.ValueOf(c))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if arg.ConvertibleTo(targetType) {
|
if targetType.ConvertibleTo(arg) {
|
||||||
args = append(args, reflect.ValueOf(c.Target))
|
args = append(args, reflect.ValueOf(c.Target))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue