Skip to content

Commit

Permalink
fix: id followed by * (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
t0rr3sp3dr0 authored Apr 18, 2024
1 parent 237bf71 commit cc92ac5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions types/objc/type_encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,10 @@ func getPropertyType(attrs string) (typ string) {
if strings.HasPrefix(attr, "@\"") {
typ = strings.Trim(attr, "@\"")
if strings.HasPrefix(typ, "<") {
typ = "id " + strings.ReplaceAll(typ, "><", ", ")
typ = "id " + strings.ReplaceAll(typ, "><", ", ") + " "
} else {
typ += " *"
}
typ += " *"
} else {
typ = decodeType(attr) + " "
}
Expand Down Expand Up @@ -249,7 +250,7 @@ func getIVarType(ivType string) string {
if strings.HasPrefix(ivType, "@\"") && len(ivType) > 1 {
ivType = strings.Trim(ivType, "@\"")
if strings.HasPrefix(ivType, "<") {
ivType = "id " + strings.ReplaceAll(ivType, "><", ", ")
return "id " + strings.ReplaceAll(ivType, "><", ", ") + " "
}
return ivType + " *"
}
Expand Down

0 comments on commit cc92ac5

Please sign in to comment.