Skip to content

Commit

Permalink
add unreachable panics
Browse files Browse the repository at this point in the history
  • Loading branch information
dsainati1 committed Mar 8, 2024
1 parent f0fd909 commit 35cad2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/sema/type_tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ func leastCommonAccess(accessA, accessB Access) Access {
}
}

return UnauthorizedAccess
panic(errors.NewUnreachableError())

Check warning on line 788 in runtime/sema/type_tags.go

View check run for this annotation

Codecov / codecov/patch

runtime/sema/type_tags.go#L788

Added line #L788 was not covered by tests
}

func commonSuperTypeOfReferences(types []Type) Type {
Expand All @@ -803,7 +803,7 @@ func commonSuperTypeOfReferences(types []Type) Type {

referenceType, ok := typ.(*ReferenceType)
if !ok {
return commonSuperTypeOfHeterogeneousTypes(types)
panic(errors.NewUnreachableError())

Check warning on line 806 in runtime/sema/type_tags.go

View check run for this annotation

Codecov / codecov/patch

runtime/sema/type_tags.go#L806

Added line #L806 was not covered by tests
}

references = append(references, referenceType)
Expand Down

0 comments on commit 35cad2c

Please sign in to comment.