Repository: yandex/yatagan (kotlin)

Issue:
Binding from the same module, included into a parent and a child components is presumed duplicated with itself.
```kotlin
import com.yandex.yatagan.*
import javax.inject.*

class TestClass @Inject constructor()

@Module interface MyModule {
    @Binds fun binds(i: TestClass): Any
}

@Component(modules = [MyModule::class])
interface TestComponent {
    val obj: Any
    fun createSub(): SubComponent
}

@Component(isRoot = false, modules = [MyModule::class])
interface SubComponent {
    val obj: Any
}
```

Produces
```
Conflicting bindings for `java.lang.Object`
NOTE: Conflicting binding: `alias test.MyModule::binds(test.TestClass)`
NOTE: Conflicting binding: `alias test.MyModule::binds(test.TestClass)`
```

Pull request:
Fixes #51

Patch:
diff --git a/core/graph/impl/src/main/kotlin/bindings/AliasBindingImpl.kt b/core/graph/impl/src/main/kotlin/bindings/AliasBindingImpl.kt
index cca93abb..e90970f0 100644
--- a/core/graph/impl/src/main/kotlin/bindings/AliasBindingImpl.kt
+++ b/core/graph/impl/src/main/kotlin/bindings/AliasBindingImpl.kt
@@ -41,14 +41,12 @@ internal class AliasBindingImpl(
 
     override fun equals(other: Any?): Boolean {
         return this === other || (other is AliasBinding &&
-                source == other.source && target == other.target &&
-                owner == other.owner)
+                source == other.source && target == other.target)
     }
 
     override fun hashCode(): Int {
         var result = target.hashCode()
         result = 31 * result + source.hashCode()
-        result = 31 * result + owner.hashCode()
         return result
     }
 


Test patch:
diff --git a/testing/tests/src/test/kotlin/CoreBindingsTest.kt b/testing/tests/src/test/kotlin/CoreBindingsTest.kt
index b1a79d5f..8cd8053a 100644
--- a/testing/tests/src/test/kotlin/CoreBindingsTest.kt
+++ b/testing/tests/src/test/kotlin/CoreBindingsTest.kt
@@ -1041,5 +1041,33 @@ class CoreBindingsTest(
 
         compileRunAndValidate()
     }
+
+    @Test
+    fun `@Binds alias is allowed to be duplicated`() {
+        givenKotlinSource("test.TestCase", """
+            import com.yandex.yatagan.*
+            import javax.inject.*
+
+            class TestClass @Inject constructor()
+
+            @Module interface MyModule {
+                @Binds fun binds(i: TestClass): Any
+                @Binds fun binds2(i: TestClass): Any
+            }
+
+            @Component(modules = [MyModule::class])
+            interface TestComponent {
+                val obj: Any
+                fun createSub(): SubComponent
+            }
+
+            @Component(isRoot = false, modules = [MyModule::class])
+            interface SubComponent {
+                val obj: Any
+            }
+        """.trimIndent())
+
+        compileRunAndValidate()
+    }
 }