Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
sonalmahajan15 committed Nov 5, 2023
1 parent 597e0e6 commit bba340e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions annotation/affiliation.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ func FullTriggerForInterfaceParamFlow(affiliation AffiliationPair, paramNum int)
Annotation: &InterfaceParamReachesImplementation{
TriggerIfNilable: &TriggerIfNilable{
Ann: ParamKeyFromArgNum(affiliation.InterfaceMethod, paramNum)},
AffiliationPair: &affiliation,
AffiliationPair: affiliation,
},
Expr: affiliation.interfaceMethodAsExpr(),
},
Consumer: &ConsumeTrigger{
Annotation: &MethodParamFromInterface{
TriggerIfNonNil: &TriggerIfNonNil{
Ann: ParamKeyFromArgNum(affiliation.ImplementingMethod, paramNum)},
AffiliationPair: &affiliation,
AffiliationPair: affiliation,
},
Expr: affiliation.implementingMethodAsExpr(),
Guards: util.NoGuards(),
Expand All @@ -91,15 +91,15 @@ func FullTriggerForInterfaceResultFlow(affiliation AffiliationPair, retNum int)
Annotation: &MethodResultReachesInterface{
TriggerIfNilable: &TriggerIfNilable{
Ann: RetKeyFromRetNum(affiliation.ImplementingMethod, retNum)},
AffiliationPair: &affiliation,
AffiliationPair: affiliation,
},
Expr: affiliation.implementingMethodAsExpr(),
},
Consumer: &ConsumeTrigger{
Annotation: &InterfaceResultFromImplementation{
TriggerIfNonNil: &TriggerIfNonNil{
Ann: RetKeyFromRetNum(affiliation.InterfaceMethod, retNum)},
AffiliationPair: &affiliation,
AffiliationPair: affiliation,
},
Expr: affiliation.interfaceMethodAsExpr(),
Guards: util.NoGuards(),
Expand Down
12 changes: 6 additions & 6 deletions annotation/copy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,19 @@ func getObjInfo(obj any) map[string]objInfo {
// - number of fields
// - pointer address (if the field is a struct and has at least one field)
func (s *CopyTestSuite) TestCopy() {
expectedObjs := make(map[string]objInfo)
actualObjs := make(map[string]objInfo)
var expectedObjs, actualObjs map[string]objInfo

for _, initStruct := range s.initStructs {
var copied any
expectedObjs = getObjInfo(initStruct)

switch t := initStruct.(type) {
case ConsumingAnnotationTrigger:
tCopied := t.Copy()
actualObjs = getObjInfo(tCopied)
copied = t.Copy()
actualObjs = getObjInfo(copied)
case Key:
kCopied := t.copy()
actualObjs = getObjInfo(kCopied)
copied = t.copy()
actualObjs = getObjInfo(copied)
default:
s.Failf("unknown type", "unknown type %T", t)
}
Expand Down

0 comments on commit bba340e

Please sign in to comment.