Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-298643: [VB] QF Implement members forgets to specify constraints

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created May 1, 2012 3:07:30 AM
Updated May 1, 2012 3:08:06 AM
Priority Normal
Type Bug
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build No Fixed in build
MustInherit Class C
    Public MustOverride Sub Foo(Of S As Exception)
End Class

Class D
    Inherits C 'Implement members
End Class


Actual:

MustInherit Class C
  Public MustOverride Sub Foo(Of S As Exception)()
End Class

Class D
  Inherits C

  Public Overrides Sub Foo(Of S)() 'error BC32077: 'Public Overrides Sub Foo(Of S)()' cannot override 'Public MustOverride Sub Foo(Of S As System.Exception)()' because they differ by type parameter constraints.
    Throw New NotImplementedException()
  End Sub
End Class


Expected:

MustInherit Class C
  Public MustOverride Sub Foo(Of S As Exception)()
End Class

Class D
  Inherits C

  Public Overrides Sub Foo(Of S As Exception)() ' OK
    Throw New NotImplementedException()
  End Sub
End Class

Viewing all articles
Browse latest Browse all 106942

Trending Articles