From: Raja R Harinath Date: Thu, 1 Oct 2009 20:20:51 +0000 (-0000) Subject: * Dictionary.cs (Do_ICollectionCopyTo): Revert 2009-10-01 change. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=b668695e5935a4120c62b4edd75d8b0a8b072378;p=mono.git * Dictionary.cs (Do_ICollectionCopyTo): Revert 2009-10-01 change. Use BOOTSTRAP_BASIC to hide code from gmcs 2.4.x. svn path=/trunk/mcs/; revision=143210 --- diff --git a/mcs/class/corlib/System.Collections.Generic/ChangeLog b/mcs/class/corlib/System.Collections.Generic/ChangeLog index ee4290744ab..919afc47ef2 100644 --- a/mcs/class/corlib/System.Collections.Generic/ChangeLog +++ b/mcs/class/corlib/System.Collections.Generic/ChangeLog @@ -1,3 +1,8 @@ +2009-10-02 Raja R Harinath + + * Dictionary.cs (Do_ICollectionCopyTo): Revert 2009-10-01 change. + Use BOOTSTRAP_BASIC to hide code from gmcs 2.4.x. + 2009-10-01 Marek Habersack * Dictionary.cs: cast target array to TRet[] instead of object[] - diff --git a/mcs/class/corlib/System.Collections.Generic/Dictionary.cs b/mcs/class/corlib/System.Collections.Generic/Dictionary.cs index ceb2d0d948f..7ebb4b07d5b 100644 --- a/mcs/class/corlib/System.Collections.Generic/Dictionary.cs +++ b/mcs/class/corlib/System.Collections.Generic/Dictionary.cs @@ -340,7 +340,13 @@ namespace System.Collections.Generic { if ((src.IsPrimitive || tgt.IsPrimitive) && !tgt.IsAssignableFrom (src)) throw new Exception (); // we don't care. it'll get transformed to an ArgumentException below - Do_CopyTo ((TRet []) array, index, transform); +#if BOOTSTRAP_BASIC + // BOOTSTRAP: gmcs 2.4.x seems to have trouble compiling the alternative + throw new Exception (); +#else + Do_CopyTo ((object []) array, index, transform); +#endif + } catch (Exception e) { throw new ArgumentException ("Cannot copy source collection elements to destination array", "array", e); }