Hi guys, I'm wondering why I can receive a declare...
# koin
k
Hi guys, I'm wondering why I can receive a declared value in
someScope
from
anotherScope
Copy code
val someScope = SomeScope(UUID.randomUUID().toString()).apply {
    scope.declare("the string", named("someString"))
}

val anotherScope = SomeScope(UUID.randomUUID().toString())

println(anotherScope.scope.get<String>(named("someString")))
Prints "the string"
SomeScope
is just a data class that implements
KoinScopeComponent
and has an id
a
a scope can hold a value declared dynamically, this is why
k
But the value was declared on a different scope
a
do you have a complete unit test for that?
sounds weird 🤔