q: are these two providers not supposed to be equi...
# kotlin-inject
s
q: are these two providers not supposed to be equivalent?
Copy code
protected val RealHttp.bind: Http
  @Provides 
  @SomeScope 
  get() = this
Copy code
@Provides
@SomeScope
fun http(real: RealHttp): Http = real
e
Those are equivalent yes. Well one minor difference is the first is protected and the second is public.
s
I may have noticed that other components are creating a new instance of
RealHttp
on every call in the 2nd example. I'll try reproducing it.
e
I'd actually recommend in this case putting the scope on the
RealHttp
class itself, but that does sound like a bug if they behave differently
s
update: I think I was wrong. I misread the generated code incorrectly because it wasn't pretty formatted. sorry for the false alarm!
I'd actually recommend in this case putting the scope on the 
RealHttp
 class itself
agreed, I'll do this
e
Yeah ideally the generated code should look clear but it can be hard to get quite right. Would certainly accept pr's that improve the formatting.