generate: Fix comparisons in generated canAssign function

This commit is contained in:
Sasha Koshka 2025-08-20 15:21:45 -04:00
parent 756bc79c16
commit 5d0b95d59a

View File

@ -41,8 +41,8 @@ type Message interface {
// the destination tag must come from the same (or hash-equivalent) PDL type.
func canAssign(destination, source tape.Tag) bool {
if destination.Is(source) { return true }
if (destination == tape.SBA || destination == tape.LBA) &&
(source == tape.SBA || source == tape.LBA) {
if (destination.Is(tape.SBA) || destination.Is(tape.LBA)) &&
(source.Is(tape.SBA) || source.Is(tape.LBA)) {
return true
}
return false