2 REM ExpectedError: BC30149
3 REM ErrorMessage: 'C1' must implement 'Sub S(a As Integer, [b As Integer = 20])' for interface 'I'.
6 REM ExpectedError: BC30401
7 REM ErrorMessage: 'S' cannot implement 'S' because there is no matching sub on interface 'I'.
10 REM ExpectedError: BC30300
11 REM ErrorMessage: 'Public Sub S(ByRef a As Integer)' and 'Public Sub S(a As Integer, [b As Integer = 30])' cannot overload each other because they differ only by optional parameters.
14 REM ExpectedError: BC30345
15 REM ErrorMessage: 'Public Sub S(ByRef a As Integer)' and 'Public Sub S(a As Integer, [b As Integer = 30])' cannot overload each other because they differ only by parameters declared 'ByRef' or 'ByVal'.
18 REM ExpectedError: BC30401
19 REM ErrorMessage: 'S' cannot implement 'S' because there is no matching sub on interface 'I'.
22 REM ExpectedError: BC30401
23 REM ErrorMessage: 'S' cannot implement 'S' because there is no matching sub on interface 'I'.
26 REM ExpectedError: BC30583
27 REM ErrorMessage: 'I.S' cannot be implemented more than once.
31 Sub S(byVal a
As Integer,Optional b
As Integer=20)
35 Sub S() Implements I
.S
37 Sub S(byRef a
As Integer) Implements I
.S
39 Sub S(byVal a
as Integer, Optional b
As Integer=30) Implements I
.S
42 Class C2
'Class implements the same method more than once
44 Public Sub S(byVal a
As Integer,Optional b
As Integer=20) Implements I
.S
46 Public Sub H(byVal a
As Integer,Optional b
As Integer=20) Implements I
.S