tschneidereit / SwiftSuspenders

NOTE: Find the offical repo at http://github.com/robotlegs/swiftsuspenders
https://github.com/robotlegs/swiftsuspenders
MIT License
280 stars 89 forks source link

Passes name through to getOrCreateNewInstance #79

Closed darscan closed 11 years ago

darscan commented 11 years ago

I'm not exactly sure if this makes sense, but it seems like name should be passed through to the underlying methods.

tschneidereit commented 11 years ago

After discussion with @darscan, we rediscovered that invoking getOrCreateInstance with a name argument wouldn't ever make sense if you're not certain you have a mapping: In that case, it would just create an unmapped instance, masking the fact that the name argument was ignored. This would always be an error and very hard to debug.