Skip to content

Commit

Permalink
feat: implemented diagnostics for oneof in destination
Browse files Browse the repository at this point in the history
  • Loading branch information
ascandone committed Feb 11, 2025
1 parent 39ffbd9 commit 4d664f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/analysis/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,13 @@ func (res *CheckResult) checkDestination(destination parser.Destination) {
}
res.checkKeptOrDestination(destination.Remaining)

case *parser.DestinationOneof:
for _, clause := range destination.Clauses {
res.checkExpression(clause.Cap, TypeMonetary)
res.checkKeptOrDestination(clause.To)
}
res.checkKeptOrDestination(destination.Remaining)

Check warning on line 584 in internal/analysis/check.go

View check run for this annotation

Codecov / codecov/patch

internal/analysis/check.go#L579-L584

Added lines #L579 - L584 were not covered by tests

case *parser.DestinationAllotment:
var remainingAllotment *parser.RemainingAllotment
var variableLiterals []parser.Variable
Expand Down

0 comments on commit 4d664f9

Please sign in to comment.