Author: jacobilsoe
Date: 2006-01-15 06:17:18 -0500 (Sun, 15 Jan 2006)
New Revision: 55596

Modified:
   trunk/monodevelop/Extras/CSharpBinding/ChangeLog
   trunk/monodevelop/Extras/CSharpBinding/Parser/CSharpVisitor.cs
Log:
2006-01-15  Jacob Ilsoe Christensen  <[EMAIL PROTECTED]>

        * Parser/CSharpVisitor.cs: Make sure that a null modifier
        is not passed to the Field constructor which is the case
        for enum members. Fixes bug 77080.



Modified: trunk/monodevelop/Extras/CSharpBinding/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/ChangeLog    2006-01-15 11:10:45 UTC 
(rev 55595)
+++ trunk/monodevelop/Extras/CSharpBinding/ChangeLog    2006-01-15 11:17:18 UTC 
(rev 55596)
@@ -1,3 +1,9 @@
+2006-01-15  Jacob Ilsoe Christensen  <[EMAIL PROTECTED]>
+
+       * Parser/CSharpVisitor.cs: Make sure that a null modifier
+       is not passed to the Field constructor which is the case
+       for enum members. Fixes bug 77080.
+
 2006-01-13 Lluis Sanchez Gual  <[EMAIL PROTECTED]>   
 
        * templates/GtkSharpProject.xpt.xml:

Modified: trunk/monodevelop/Extras/CSharpBinding/Parser/CSharpVisitor.cs
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/Parser/CSharpVisitor.cs      
2006-01-15 11:10:45 UTC (rev 55595)
+++ trunk/monodevelop/Extras/CSharpBinding/Parser/CSharpVisitor.cs      
2006-01-15 11:17:18 UTC (rev 55596)
@@ -264,7 +264,14 @@
                        if (currentClass.Count > 0) {
                                foreach (AST.VariableDeclaration field in 
fieldDeclaration.Fields) {
                                        ModifierFlags mf = 
fieldDeclaration.Modifiers != null ? fieldDeclaration.Modifiers.Code : 
ModifierFlags.None;
-                                       Field f = new Field (c, type, 
field.Name, mf, region);  
+
+                                       Field f;
+
+                                       if (fieldDeclaration.Modifiers == null)
+                                               f = new Field (c, type, 
field.Name, RefParser.ModifierFlags.None, region);      
+                                       else
+                                               f = new Field (c, type, 
field.Name, fieldDeclaration.Modifiers.Code, region);   
+
                                        c.Fields.Add(f);
                                        FillAttributes (f, 
fieldDeclaration.Attributes);
                                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to