google / google/guice

Depending on a narrower scope is not an error

Open
#1,310 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
12.7k
Forks
1.7k
Avg merge
11m
Merged PRs (30d)
2

Description

This [documentation page](https://github.com/google/guice/wiki/InjectingProviders#providers-for-mixing-scopes) states:

> 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'.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.