generate: Fix comparisons in generated canAssign function
This commit is contained in:
parent
756bc79c16
commit
5d0b95d59a
@ -41,8 +41,8 @@ type Message interface {
|
|||||||
// the destination tag must come from the same (or hash-equivalent) PDL type.
|
// the destination tag must come from the same (or hash-equivalent) PDL type.
|
||||||
func canAssign(destination, source tape.Tag) bool {
|
func canAssign(destination, source tape.Tag) bool {
|
||||||
if destination.Is(source) { return true }
|
if destination.Is(source) { return true }
|
||||||
if (destination == tape.SBA || destination == tape.LBA) &&
|
if (destination.Is(tape.SBA) || destination.Is(tape.LBA)) &&
|
||||||
(source == tape.SBA || source == tape.LBA) {
|
(source.Is(tape.SBA) || source.Is(tape.LBA)) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user