Skip to content

Conversation

@ileitch
Copy link
Contributor

@ileitch ileitch commented Jan 17, 2026

The swiftNameToSelector function was incorrectly converting Swift method names to Objective-C selectors for IBAction methods:

  • Named first parameter: colorTapped(sender:) should produce colorTappedWithSender: but was producing colorTapped:
  • No parameters: confirmTapped() should produce confirmTapped but was producing confirmTapped:
  • Preposition parameters: click(for:) should produce clickFor: (no "With" prefix)

The fix implements the full Swift-to-ObjC selector conversion rules, including handling of prepositions from Swift's PartsOfSpeech.def.

Resolves #1049

… unused

The swiftNameToSelector function was incorrectly converting Swift method names
to Objective-C selectors for IBAction methods:

- Named first parameter: `colorTapped(sender:)` should produce `colorTappedWithSender:`
  but was producing `colorTapped:`
- No parameters: `confirmTapped()` should produce `confirmTapped` but was
  producing `confirmTapped:`
- Preposition parameters: `click(for:)` should produce `clickFor:` (no "With" prefix)

The fix implements the full Swift-to-ObjC selector conversion rules, including
handling of prepositions from Swift's PartsOfSpeech.def.

Resolves #1049
@ileitch ileitch merged commit 7211aee into master Jan 17, 2026
13 checks passed
@ileitch ileitch deleted the issue-1049 branch January 17, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False-positive: IBAction methods with named parameters marked as unused

2 participants