From: Alexander Köplinger Date: Wed, 11 May 2016 12:36:57 +0000 (+0200) Subject: [System] Rename variable to fix bootstrapping with Mono 3.10 mcs X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=b56e03aa19f678290684745d3b488d1a41a13091;p=mono.git [System] Rename variable to fix bootstrapping with Mono 3.10 mcs We were seeing compilation errors like this: ``` System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtension.cs(71,20): error CS0135: `oid' conflicts with a declaration in a child block System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtension.cs(74,17): (Location of the symbol related to previous error) Compilation failed: 1 error(s), 38 warnings make[9]: *** [../../class/lib/basic/secxml/System.dll] Error 1 ``` The new foreach variables introduced in 4a6e5d24e174b9d2860300503b4a79396d7ae96d with the same "oid" name as the global constant apparently confused the older mcs compiler. Rename them to avoid this. --- diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtension.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtension.cs index eeabf6905e3..681b8ff8be8 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtension.cs +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtension.cs @@ -71,8 +71,8 @@ namespace System.Security.Cryptography.X509Certificates { _oid = new Oid (oid, friendlyName); base.Critical = critical; _enhKeyUsage = new OidCollection(); - foreach (Oid oid in enhancedKeyUsages) { - _enhKeyUsage.Add(oid); + foreach (Oid o in enhancedKeyUsages) { + _enhKeyUsage.Add(o); } RawData = Encode (); } @@ -87,8 +87,8 @@ namespace System.Security.Cryptography.X509Certificates { OidCollection oids = new OidCollection(); if (_enhKeyUsage != null) { - foreach(Oid oid in _enhKeyUsage) { - oids.Add(oid); + foreach(Oid o in _enhKeyUsage) { + oids.Add(o); } } return oids; @@ -150,8 +150,8 @@ namespace System.Security.Cryptography.X509Certificates { internal byte[] Encode () { ASN1 ex = new ASN1 (0x30); - foreach (Oid oid in _enhKeyUsage) { - ex.Add (ASN1Convert.FromOid (oid.Value)); + foreach (Oid o in _enhKeyUsage) { + ex.Add (ASN1Convert.FromOid (o.Value)); } return ex.GetBytes (); }