Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxincs committed May 4, 2024
1 parent 83acac3 commit cbfaa2a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions assertion/function/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ func duplicateFullTriggersFromContractedFunctionsToCallers(
for ctrtFunc, calls := range callsByCtrtFunc {
r := funcResults[ctrtFunc]
if r == nil {
// should not happen since funcResults should contain all the functions including any
// contracted functions.
panic(fmt.Sprintf("Did not find the contracted function %s in funcResults", ctrtFunc.Id()))
// The contracted function is imported from upstream, and the local package analysis
// does not involve it.
continue
}
for _, trigger := range r.triggers {
// If the full trigger has a FuncParam producer or a UseAsReturn consumer, then create
Expand Down Expand Up @@ -312,9 +312,9 @@ func duplicateFullTriggersFromContractedFunctionsToCallers(
for funcObj, triggers := range dupTriggers {
r := funcResults[funcObj]
if r == nil {
// should not happen since funcResults should contain all the functions including any
// contracted functions.
panic(fmt.Sprintf("Did not find the contracted function %s in funcResults", funcObj.Id()))
// Should not happen since we would not have created the duplicated triggers if the
// contracted function is not involved in the analysis of local package.
panic(fmt.Sprintf("did not find the contracted function %s in funcResults", funcObj.Id()))
}
funcTriggers[r.index] = append(funcTriggers[r.index], triggers...)
}
Expand Down

0 comments on commit cbfaa2a

Please sign in to comment.