Commit c79a07f2 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #32049 from smarterclayton/incorrect_pointer

Automatic merge from submit-queue generated DeepCopy without a function on a struct pointer is wrong in and out are both pointers to pointers, so *in has to be cast to *Type, not Type. @sttts hit this while debugging something else (most everything should be generated, but in this case the type is wrong)
parents 606e8fb3 13adc63b
...@@ -609,7 +609,7 @@ func (g *genDeepCopy) doPointer(t *types.Type, sw *generator.SnippetWriter) { ...@@ -609,7 +609,7 @@ func (g *genDeepCopy) doPointer(t *types.Type, sw *generator.SnippetWriter) {
sw.Do("if newVal, err := c.DeepCopy(*in); err != nil {\n", nil) sw.Do("if newVal, err := c.DeepCopy(*in); err != nil {\n", nil)
sw.Do("return err\n", nil) sw.Do("return err\n", nil)
sw.Do("} else {\n", nil) sw.Do("} else {\n", nil)
sw.Do("*out = newVal.($.|raw$)\n", t.Elem) sw.Do("*out = newVal.(*$.|raw$)\n", t.Elem)
sw.Do("}\n", nil) sw.Do("}\n", nil)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment