2001-11-22 Miguel de Icaza <miguel@ximian.com>
authorMiguel de Icaza <miguel@gnome.org>
Thu, 22 Nov 2001 03:13:04 +0000 (03:13 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Thu, 22 Nov 2001 03:13:04 +0000 (03:13 -0000)
* expression.cs (Binary.ResolveOperator): Update the values of `l'
and `r' after calling DoNumericPromotions.

* ecore.cs: Fix error message (the types were in the wrong order).

* statement.cs (Foreach.ProbeCollectionType): Need to pass
BindingFlags.Instance as well

svn path=/trunk/mcs/; revision=1417

mcs/mcs/ChangeLog
mcs/mcs/compiler.csproj
mcs/mcs/compiler.csproj.user
mcs/mcs/ecore.cs
mcs/mcs/expression.cs
mcs/mcs/statement.cs

index 087a3e3983e27a272bfe686849c8f3c18fbb9205..f9c932d800f408ac928cd333f5fc175894b8dcf7 100755 (executable)
@@ -1,5 +1,13 @@
 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
 
+       * expression.cs (Binary.ResolveOperator): Update the values of `l'
+       and `r' after calling DoNumericPromotions.
+
+       * ecore.cs: Fix error message (the types were in the wrong order).
+
+       * statement.cs (Foreach.ProbeCollectionType): Need to pass
+       BindingFlags.Instance as well 
+
        * ecore.cs (Expression.TryImplicitIntConversion): Wrap the result
        implicit int literal conversion in an empty cast so that we
        propagate the right type upstream.
index 29a087c6c389de1a556b0d1c28c9f6d649a91368..62c8e6df56ea811679959b60c64643d0f46fd65b 100755 (executable)
                     Name = "System.XML"\r
                     AssemblyName = "System.Xml"\r
                 />\r
+                <Reference\r
+                    Name = "System.Web.Services"\r
+                    AssemblyName = "System.Web.Services"\r
+                />\r
             </References>\r
         </Build>\r
         <Files>\r
                     SubType = "Code"\r
                     BuildAction = "Compile"\r
                 />\r
-                <File\r
-                    RelPath = "gen-treedump.cs"\r
-                    SubType = "Code"\r
-                    BuildAction = "Compile"\r
-                />\r
                 <File\r
                     RelPath = "interface.cs"\r
                     SubType = "Code"\r
                     SubType = "Code"\r
                     BuildAction = "Compile"\r
                 />\r
+                <Folder\r
+                    RelPath = "Web References\"\r
+                    WebReferences = "TRUE"\r
+                />\r
             </Include>\r
         </Files>\r
     </CSHARP>\r
index a6e31d2e4f6ccb13f11d36769a3e20f1b36eefeb..d57f5b77301a9f04f405c8d627e0226fc997e827 100755 (executable)
@@ -11,7 +11,7 @@
                     RemoteDebugEnabled = "false"\r
                     RemoteDebugMachine = ""\r
                     StartAction = "Project"\r
-                    StartArguments = "c:\mono\mcs\tests\test-4.cs"\r
+                    StartArguments = "c:\mono\mcs\tests\test-34.cs"\r
                     StartPage = ""\r
                     StartProgram = ""\r
                     StartURL = ""\r
index 1c9e673230bdc2f02c8ba721b532a471d865d017..d953786a03561eb3aa9e8d16720258f9e7d7afb8 100755 (executable)
@@ -1171,8 +1171,8 @@ namespace Mono.CSharp {
                                return e;
                        
                        string msg = "Can not convert implicitly from `"+
-                               TypeManager.CSharpName (target.Type) + "' to `" +
-                               TypeManager.CSharpName (type) + "'";
+                               TypeManager.CSharpName (type) + "' to `" +
+                               TypeManager.CSharpName (target.Type) + "'";
 
                        Error (29, loc, msg);
 
index 5dd45173b92684639179598469c6116649beca6a..a15d442b8b661ddd7c7c60704a10118c3425175f 100755 (executable)
@@ -1221,18 +1221,26 @@ namespace Mono.CSharp {
                        if (left == null || right == null)
                                return null;
 
+                       //
+                       // reload our cached types if required
+                       //
+                       l = left.Type;
+                       r = right.Type;
                        
                        if (oper == Operator.BitwiseAnd ||
                            oper == Operator.BitwiseOr ||
                            oper == Operator.ExclusiveOr){
-                               if (!((l == TypeManager.int32_type) ||
-                                     (l == TypeManager.uint32_type) ||
-                                     (l == TypeManager.int64_type) ||
-                                     (l == TypeManager.uint64_type))){
+                               if (l == r){
+                                       if (l.IsSubclassOf (TypeManager.enum_type) ||
+                                           !((l == TypeManager.int32_type) ||
+                                             (l == TypeManager.uint32_type) ||
+                                             (l == TypeManager.int64_type) ||
+                                             (l == TypeManager.uint64_type)))
+                                               type = l;
+                               } else {
                                        error19 ();
                                        return null;
                                }
-                               type = l;
                        }
 
                        if (oper == Operator.Equality ||
index 0157b7af4c1d48add00dd5c413259923e77d78da..25b60930d88ee788634087d3f20f87b0b558e8c2 100755 (executable)
@@ -1115,7 +1115,7 @@ namespace Mono.CSharp {
                        MemberInfo [] mi;
 
                        mi = TypeContainer.FindMembers (t, MemberTypes.Method,
-                                                       BindingFlags.Public,
+                                                       BindingFlags.Public | BindingFlags.Instance,
                                                        FilterEnumerator, null);
 
                        if (mi == null){