From 0f23b277fa20ef99bd1550b52fca55df02cf5ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20T=C3=B4rres?= Date: Sun, 28 Apr 2024 18:14:16 -0700 Subject: [PATCH] fix: always replace `><` with `, ` --- types/objc/type_encoding.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/objc/type_encoding.go b/types/objc/type_encoding.go index 59799a4..475134c 100644 --- a/types/objc/type_encoding.go +++ b/types/objc/type_encoding.go @@ -180,8 +180,9 @@ func getPropertyType(attrs string) (typ string) { } if strings.HasPrefix(attr, "@\"") { typ = strings.Trim(attr, "@\"") + typ = strings.ReplaceAll(typ, "><", ", ") if strings.HasPrefix(typ, "<") { - typ = "id " + strings.ReplaceAll(typ, "><", ", ") + " " + typ = "id " + typ + " " } else { typ += " *" } @@ -249,8 +250,9 @@ func getPropertyAttributeTypes(attrs string) (string, bool) { func getIVarType(ivType string) string { if strings.HasPrefix(ivType, "@\"") && len(ivType) > 1 { ivType = strings.Trim(ivType, "@\"") + ivType = strings.ReplaceAll(ivType, "><", ", ") if strings.HasPrefix(ivType, "<") { - return "id " + strings.ReplaceAll(ivType, "><", ", ") + " " + return "id " + ivType + " " } return ivType + " *" }