Skip to content

Commit

Permalink
fix: HasSwift function to check for sections
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed May 30, 2024
1 parent 25e5887 commit a49eaa3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions swift.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ func (f *File) HasSwift() bool {
return true
}
}
for _, sec := range f.Sections {
switch sec.Name {
case "__swift5_types", "__swift5_types2", "__swift5_builtin", "__swift5_fieldmd", "__swift5_assocty", "__swift5_protos", "__swift5_proto", "__swift5_reflstr", "__swift5_capture", "__swift5_typeref", "__swift5_mpenum", "__constg_swiftt", "__swift5_replace", "__swift5_replac2", "__swift5_acfuncs":
return true
}
}
return false
}

Expand Down

0 comments on commit a49eaa3

Please sign in to comment.