This project is read-only.

VB Incorrectly squiggles unimplemented interface method


Create a console application and paste the following code.

Produces the following error
Class 'foo' must implement 'Sub method3()' for interface 'iderived'.

But iderived2 is squiggled not iderived.
Imports ConsoleApplication4

Module Module1

    Sub Main()

    End Sub

End Module

Interface ibase
    Sub method1()

End Interface

Interface ibase2
    Sub method2()
End Interface

Interface iderived
    Inherits ibase
    Sub method3()
End Interface

Interface iderived2
    Inherits iderived

    Sub method4()
End Interface

Class foo
    Implements iderived2, iderived, ibase, ibase2

    Public Sub method1() Implements ibase.method1
        Throw New NotImplementedException()
    End Sub

    Public Sub method2() Implements ibase2.method2
        Throw New NotImplementedException()
    End Sub

    Public Sub method4() Implements iderived2.method4
        Throw New NotImplementedException()
    End Sub
End Class


AdamSpeight2008 wrote May 5, 2014 at 3:46 AM

I suspect it happenns cos that interface appears first in the list of implements
Since it also unherit iderives, it squighle its, cos you've not implemented that method.