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

Fix when injecting a constructor with several constructor-injected dependencies #81

Closed chwthewke closed 11 years ago

chwthewke commented 11 years ago

A global Array _parameterValues was used in MethodInjectionPoint.as, so that during recursive calls of applyInjection, its content would get clobbered and resolved dependencies replaced with null for the outer injection.

A test exposing the defect was also added (at the end of InjectorTests).

PS: for some reason github shows the diff as full file diffs, even though I took great care not to apply formatting tools - I even checked the files in an hex editor, and they seem identical except for my specific changes. Not being very experienced with either git or GitHub I could not figure how to prevent that; I hope it does not complicate merging too much.

chwthewke commented 11 years ago

Well, it would seem that the full-file diff issue comes from how GitHub for Windows does commits somehow, so I'll make another branch and pull request