tschneidereit/SwiftSuspenders — Issue #62: Named injections, map.toValue(null), satisfies() and getInstance()
Author: darscan
Created: 2011-11-11 18:38:04+00:00
State: open

If I map a named value to null, satisfies returns true, but getInstance fails:

injector.map(Function, 'callback').toValue(null);
if (injector.satisfies(Function, 'callback'))
injector.getInstance(Function, 'callback');

> Error: No mapping found for request Function|callback. getInstance only creates an unmapped instance if no name is given.