Changeset 397


Ignore:
Timestamp:
Jan 2, 2008, 1:25:56 AM (16 years ago)
Author:
dai
Message:

Foreachステートメントの区切り文字として、カンマを廃止し、Inを採用した。
ジェネリクスインターフェイス実装時のオーバーロード解決ロジックを改良。(型パラメータを戻り値またはパラメータに持つメソッドのオーバーロードをミスしてしまうバグを修正)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/TestCase/SimpleTestCase/InterfaceTest.ab

    r356 r397  
    99    Function Proc5() As String
    1010    Function Proc6( value As String ) As Boolean
     11End Interface
     12
     13Interface IGenericTest<T>
     14    Function GenericProc1() As T
     15    Function GenericProc2( value As T ) As Boolean
    1116End Interface
    1217
     
    3136
    3237Class Test2
    33     Implements ITest1, ITest2
     38    Implements ITest1, ITest2, IGenericTest<String>
    3439
    3540    a As Long
     
    5459    Override Function Proc6( value As String ) As Boolean
    5560        Return ( value = ( "Proc6 calling" + a.ToString() ) )
     61    End Function
     62
     63    Function GenericProc1() As String
     64        Return "GenericProc1 is ok"
     65    End Function
     66
     67    Function GenericProc2( value As String ) As Boolean
     68        Return ( value = "GenericProc2 calling" )
    5669    End Function
    5770End Class
     
    96109    GlobalProc2( test2, test2, 1 )
    97110    GlobalProc2( Nothing, itest2, 2 )
     111
     112    Dim iGenericTest As IGenericTest<String>
     113    iGenericTest = test2 As IGenericTest<String>
     114    UnitTest( "Interface ... calling class2 interface 3", iGenericTest.GenericProc1() = "GenericProc1 is ok" )
     115
     116    UnitTest( "Interface ... calling class2 interface 4", iGenericTest.GenericProc2( "GenericProc2 calling" ) )
    98117End Sub
    99118
Note: See TracChangeset for help on using the changeset viewer.