We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f66c33 commit 478fc28Copy full SHA for 478fc28
typed/merge.go
@@ -80,7 +80,12 @@ func (w *mergingWalker) merge(prefixFn func() string) (errs ValidationErrors) {
80
81
alhs := deduceAtom(a, w.lhs)
82
arhs := deduceAtom(a, w.rhs)
83
- if alhs.Equals(&arhs) {
+
84
+ // deduceAtom does not fix the type for nil values
85
+ // nil is a wildcard and will accept whatever form the other operand takes
86
+ if w.rhs == nil {
87
+ errs = append(errs, handleAtom(alhs, w.typeRef, w)...)
88
+ } else if w.lhs == nil || alhs.Equals(&arhs) {
89
errs = append(errs, handleAtom(arhs, w.typeRef, w)...)
90
} else {
91
w2 := *w
0 commit comments