Skip to content

Commit

Permalink
fix: conforming to a protocol does not imply in conforming to NSObject (
Browse files Browse the repository at this point in the history
  • Loading branch information
t0rr3sp3dr0 authored Apr 16, 2024
1 parent 3c82901 commit 6cff7f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/objc/type_encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func getPropertyType(attrs string) (typ string) {
if strings.HasPrefix(attr, "@\"") {
typ = strings.Trim(attr, "@\"")
if strings.HasPrefix(typ, "<") {
typ = "NSObject" + strings.ReplaceAll(typ, "><", ", ")
typ = "id " + strings.ReplaceAll(typ, "><", ", ")
}
typ += " *"
} else {
Expand Down Expand Up @@ -249,7 +249,7 @@ func getIVarType(ivType string) string {
if strings.HasPrefix(ivType, "@\"") && len(ivType) > 1 {
ivType = strings.Trim(ivType, "@\"")
if strings.HasPrefix(ivType, "<") {
ivType = "NSObject" + strings.ReplaceAll(ivType, "><", ", ")
ivType = "id " + strings.ReplaceAll(ivType, "><", ", ")
}
return ivType + " *"
}
Expand Down

0 comments on commit 6cff7f7

Please sign in to comment.