From: Choy R. <ch...@us...> - 2005-05-11 05:22:31
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2203/DotNetMock/Dynamic Modified Files: ExpectationMethod.cs Log Message: BUG [ 1199222 ] Does not cast return value well * Fixed an error in that last fix. Index: ExpectationMethod.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/ExpectationMethod.cs,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** ExpectationMethod.cs 11 May 2005 05:17:14 -0000 1.25 --- ExpectationMethod.cs 11 May 2005 05:22:22 -0000 1.26 *************** *** 270,276 **** // in the IL that unboxes the return value. Type expectedReturnType = _expectedReturnValue.GetType(); ! if ( expectedReturnType.IsValueType ) { - Type returnType = ActualMethod.ReturnType; if ( returnType!=expectedReturnType ) { --- 270,276 ---- // in the IL that unboxes the return value. Type expectedReturnType = _expectedReturnValue.GetType(); ! Type returnType = ActualMethod.ReturnType; ! if ( returnType!=typeof(void) && returnType.IsValueType ) { if ( returnType!=expectedReturnType ) { |