Skip to content

Commit

Permalink
fix(plc4go/plc4xGenerator): support edge case for delegates
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Sep 4, 2024
1 parent 0d99b07 commit bf0ed03
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plc4go/tools/plc4xGenerator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,15 @@ func (f *File) genDecl(node ast.Node) bool {
hasLocker: hasLocker,
})
continue
case *ast.SelectorExpr:
f.fields = append(f.fields, Field{
fieldType: set.Sel,
isDelegate: true,
isStringer: isStringer,
asPtr: asPtr,
hasLocker: hasLocker,
})
continue
default:
panic(fmt.Sprintf("Only pointer to struct delegates supported now. Type %T", field.Type))
}
Expand Down

0 comments on commit bf0ed03

Please sign in to comment.