Skip to content

Commit b3352f3

Browse files
committed
running diagnostics for destination oneof
1 parent 6a333bf commit b3352f3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/analysis/check.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,13 @@ func (res *CheckResult) checkDestination(destination parser.Destination) {
535535
}
536536
res.checkKeptOrDestination(destination.Remaining)
537537

538+
case *parser.DestinationOneof:
539+
for _, clause := range destination.Clauses {
540+
res.checkExpression(clause.Cap, TypeMonetary)
541+
res.checkKeptOrDestination(clause.To)
542+
}
543+
res.checkKeptOrDestination(destination.Remaining)
544+
538545
case *parser.DestinationAllotment:
539546
var remainingAllotment *parser.RemainingAllotment
540547
var variableLiterals []parser.Variable

0 commit comments

Comments
 (0)