Skip to content

Commit

Permalink
change producers and consumers to pointer types; add equals
Browse files Browse the repository at this point in the history
  • Loading branch information
sonalmahajan15 committed Oct 20, 2023
1 parent 550de8d commit f8d23c7
Show file tree
Hide file tree
Showing 21 changed files with 1,368 additions and 705 deletions.
24 changes: 12 additions & 12 deletions annotation/affiliation.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ func (a AffiliationPair) implementingMethodAsExpr() ast.Expr {
func FullTriggerForInterfaceParamFlow(affiliation AffiliationPair, paramNum int) FullTrigger {
return FullTrigger{
Producer: &ProduceTrigger{
Annotation: InterfaceParamReachesImplementation{
TriggerIfNilable: TriggerIfNilable{
Annotation: &InterfaceParamReachesImplementation{
TriggerIfNilable: &TriggerIfNilable{
Ann: ParamKeyFromArgNum(affiliation.InterfaceMethod, paramNum)},
AffiliationPair: affiliation,
AffiliationPair: &affiliation,
},
Expr: affiliation.interfaceMethodAsExpr(),
},
Consumer: &ConsumeTrigger{
Annotation: MethodParamFromInterface{
TriggerIfNonNil: TriggerIfNonNil{
Annotation: &MethodParamFromInterface{
TriggerIfNonNil: &TriggerIfNonNil{
Ann: ParamKeyFromArgNum(affiliation.ImplementingMethod, paramNum)},
AffiliationPair: affiliation,
AffiliationPair: &affiliation,
},
Expr: affiliation.implementingMethodAsExpr(),
Guards: util.NoGuards(),
Expand All @@ -88,18 +88,18 @@ func FullTriggerForInterfaceParamFlow(affiliation AffiliationPair, paramNum int)
func FullTriggerForInterfaceResultFlow(affiliation AffiliationPair, retNum int) FullTrigger {
return FullTrigger{
Producer: &ProduceTrigger{
Annotation: MethodResultReachesInterface{
TriggerIfNilable: TriggerIfNilable{
Annotation: &MethodResultReachesInterface{
TriggerIfNilable: &TriggerIfNilable{
Ann: RetKeyFromRetNum(affiliation.ImplementingMethod, retNum)},
AffiliationPair: affiliation,
AffiliationPair: &affiliation,
},
Expr: affiliation.implementingMethodAsExpr(),
},
Consumer: &ConsumeTrigger{
Annotation: InterfaceResultFromImplementation{
TriggerIfNonNil: TriggerIfNonNil{
Annotation: &InterfaceResultFromImplementation{
TriggerIfNonNil: &TriggerIfNonNil{
Ann: RetKeyFromRetNum(affiliation.InterfaceMethod, retNum)},
AffiliationPair: affiliation,
AffiliationPair: &affiliation,
},
Expr: affiliation.interfaceMethodAsExpr(),
Guards: util.NoGuards(),
Expand Down
Loading

0 comments on commit f8d23c7

Please sign in to comment.