It is an error to depend on an object in a narrower scope
However, this is not enforced, so not truly an error. An exception should either be thrown when injecting an object with an object of a narrower scope, or the documentation should be revised to reflect that this will merely cause unintended results but is not an 'error'.
This documentation page states:
However, this is not enforced, so not truly an error. An exception should either be thrown when injecting an object with an object of a narrower scope, or the documentation should be revised to reflect that this will merely cause unintended results but is not an 'error'.