appsquickly / typhoon

Powerful dependency injection for Objective-C ✨✨ (https://PILGRIM.PH is the pure Swift successor to Typhoon!!)✨✨
https://pilgrim.ph
Apache License 2.0
2.7k stars 269 forks source link

Fix 'attach' method declarations that are ambiguous in Swift 3 #534

Closed manicakes closed 7 years ago

manicakes commented 7 years ago

TyphoonComponentFactory.attachDefinitionPostProcessor and TyphoonComponentFactory.attachInstancePostProcessor both resolve to TyphoonComponentFactory.attach with Swift's automatic method name generation.

This causes a compilation error with Swift 3 (maybe even earlier versions; all I know is that I wasn't encountering this in Swift 1.x): myAssembly.attach(myPatcher) would fail saying that method attach is ambiguous. Unfortunately, there doesn't seem to be a workaround, so I resorted to NS_SWIFT_NAME to explicitly set the Swift method names.

alexgarbarev commented 7 years ago

Wow! Thanks! I'll review and merge that later today