Skip to content

Commit

Permalink
fix: check if superclass has local header (#444)
Browse files Browse the repository at this point in the history
  • Loading branch information
t0rr3sp3dr0 authored Apr 18, 2024
1 parent 3bfd710 commit af4360b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/commands/macho/objc.go
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,12 @@ func (o *ObjC) processForwardDeclarations(m *macho.File) (map[string]Imports, er
}

for _, class := range classes {
imp := Imports{}
imp.Imports = append(imp.Imports, class.SuperClass+".h")
var imp Imports
if slices.Contains(classNames, class.SuperClass) {
imp.Locals = append(imp.Locals, class.SuperClass+".h")
} else {
imp.Classes = append(imp.Classes, class.SuperClass)
}
for _, prot := range class.Protocols {
if slices.Contains(protoNames, prot.Name) {
imp.Locals = append(imp.Locals, prot.Name+"-Protocol.h")
Expand Down

0 comments on commit af4360b

Please sign in to comment.