@@ -161,7 +161,7 @@ static NewReference NewInstance(Type elementType, BorrowedReference arrayPyType,
161161{
162162if ( ! Runtime . PyInt_Check ( idx ) )
163163{
164- return RaiseTypeError ( idx ) ;
164+ return RaiseIndexMustBeIntegerError ( idx ) ;
165165}
166166index = Runtime . PyInt_AsLong ( idx ) ;
167167
@@ -205,7 +205,7 @@ static NewReference NewInstance(Type elementType, BorrowedReference arrayPyType,
205205IntPtr op = Runtime . PyTuple_GetItem ( idx , i ) ;
206206if ( ! Runtime . PyInt_Check ( op ) )
207207{
208- return RaiseTypeError ( op ) ;
208+ return RaiseIndexMustBeIntegerError ( op ) ;
209209}
210210index = Runtime . PyInt_AsLong ( op ) ;
211211
@@ -263,7 +263,7 @@ static NewReference NewInstance(Type elementType, BorrowedReference arrayPyType,
263263{
264264if ( ! Runtime . PyInt_Check ( idx ) )
265265{
266- RaiseTypeError ( idx ) ;
266+ RaiseIndexMustBeIntegerError ( idx ) ;
267267return - 1 ;
268268}
269269index = Runtime . PyInt_AsLong ( idx ) ;
@@ -306,7 +306,7 @@ static NewReference NewInstance(Type elementType, BorrowedReference arrayPyType,
306306IntPtr op = Runtime . PyTuple_GetItem ( idx , i ) ;
307307if ( ! Runtime . PyInt_Check ( op ) )
308308{
309- RaiseTypeError ( op ) ;
309+ RaiseIndexMustBeIntegerError ( op ) ;
310310return - 1 ;
311311}
312312index = Runtime . PyInt_AsLong ( op ) ;
@@ -338,7 +338,7 @@ static NewReference NewInstance(Type elementType, BorrowedReference arrayPyType,
338338return 0 ;
339339}
340340
341- private static IntPtr RaiseTypeError ( IntPtr idx )
341+ private static IntPtr RaiseIndexMustBeIntegerError ( IntPtr idx )
342342{
343343string tpName = Runtime . PyObject_GetTypeName ( idx ) ;
344344return Exceptions . RaiseTypeError ( $ "array index has type{ tpName } , expected an integer") ;