-
Notifications
You must be signed in to change notification settings - Fork 462
Open
Description
With types like these:
type MapAlias map[string]string // any map would work
type Foo struct {
Bar *MapAlias
}DeepCopyInto for Foo is generated with a type error:
...
*out = new(map[string]string) // incompatible types - expected MapAlias, got map[string]stringwhile instead it should generate:
*out = new(MapAlias)Looks like this line is the culprit:
controller-tools/pkg/deepcopy/traverse.go
Line 546 in cf302a3
| c.Linef("*out = new(%s)", (&namingInfo{typeInfo: underlyingElem}).Syntax(c.pkg, c.importsList)) |
However, I'm not sure if the fix is as simple as replacing underlyingElem with pointerType.Elem(). I guess there was a reason why this line looks different than the previous if block
Similar to #586
Metadata
Metadata
Assignees
Labels
No labels