'<interfacename1>.<membername>' 인터페이스 구현이 일부 형식 인수에 대해 구현된 다른 인터페이스 '<interfacename2>.<membername>'의 구현과 충돌할 수 있으므로 이 인터페이스를 구현할 수 없습니다.
업데이트: 2007년 11월
Cannot implement '<interfacename1>.<membername>' because its implementation could conflict with the implementation for '<interfacename2>.<membername>' for some type arguments
하나의 클래스가 두 개 이상의 제네릭 인터페이스를 구현하고 이 중 한 인터페이스가 다른 인터페이스에서 상속되어 인터페이스 멤버에 대한 두 가지 구현이 형식 인수의 특정 값에 대해 충돌할 수 있습니다.
다음 문을 실행하면 이 오류가 발생할 수 있습니다.
Public Interface iFace1(Of t)
Sub testSub()
End Interface
Public Interface iFace2(Of u)
Inherits iFace1(Of u)
End Interface
Public Class testClass(Of y, z)
Implements iFace1(Of y), iFace2(Of z)
Public Sub testSuby() Implements iFace1(Of y).testSub
End Sub
Public Sub testSubz() Implements iFace1(Of z).testSub
End Sub
End Class
iFace2는 고유한 형식 매개 변수(u)를 사용하는 iFace1에서 상속되므로 동일한 형식 인수가 y 및 z로 전달되는 경우 testClass는 동일한 서명을 사용하는 두 가지 버전의 iFace1.testSub를 구현합니다. 이러한 경우 액세스할 버전이 명확하지 않습니다.
오류 ID: BC32125
이 오류를 해결하려면
두 가지 다른 형식 인수로 iFace1을 구현할 수 없도록 인터페이스의 상속 구조를 변경합니다.
-또는-
Implements 문에서 구현 충돌이 발생하는 인터페이스 중 하나를 제거합니다.