2003-06-28 Miguel de Icaza <miguel@ximian.com>
authorMiguel de Icaza <miguel@gnome.org>
Sun, 29 Jun 2003 04:00:28 +0000 (04:00 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sun, 29 Jun 2003 04:00:28 +0000 (04:00 -0000)
* class.cs (Constructor.Define): Set the private flag for static
constructors as well.

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

mcs/mcs/ChangeLog
mcs/mcs/class.cs

index 7ec8f4e6106bf78f346cc0026e93899e3aeb8bc5..d59e9215e438a058784def85b0d43aca81f2945b 100755 (executable)
@@ -1,5 +1,8 @@
 2003-06-28  Miguel de Icaza  <miguel@ximian.com>
 
+       * class.cs (Constructor.Define): Set the private flag for static
+       constructors as well.
+
        * cs-parser.jay (statement_expression): Set the return value to
        null, to avoid a crash when we catch an error.
 
index 99bd117f3ca0b6c81e5a9ab622cadd1463d23927..4890d04aa58be40a2a3886ce666fa071d39e2039 100755 (executable)
@@ -2635,9 +2635,9 @@ namespace Mono.CSharp {
                        if (!DoDefineParameters (container))
                                return false;
 
-                       if ((ModFlags & Modifiers.STATIC) != 0)
-                               ca |= MethodAttributes.Static;
-                       else {
+                       if ((ModFlags & Modifiers.STATIC) != 0){
+                               ca |= MethodAttributes.Static | MethodAttributes.Private;
+                       else {
                                if (container is Struct && ParameterTypes.Length == 0){
                                        Report.Error (
                                                568, Location,