2009-05-21 Marek Safar <marek.safar@gmail.com>
authorMarek Safar <marek.safar@gmail.com>
Thu, 21 May 2009 10:14:13 +0000 (10:14 -0000)
committerMarek Safar <marek.safar@gmail.com>
Thu, 21 May 2009 10:14:13 +0000 (10:14 -0000)
A fix for bug #504667
* class.cs: Check for static class using parent container instead of
parent type.

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

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

index 77b6caf3fd85aa1923e8c711224e403c8406ce47..86e8bd27e91d9930355af0dc6229cec1e6efe3d8 100644 (file)
@@ -1,7 +1,13 @@
+2009-05-21  Marek Safar  <marek.safar@gmail.com>
+
+       A fix for bug #504667
+       * class.cs: Check for static class using parent container instead of
+       parent type.
+
 2009-05-08  Marek Safar  <marek.safar@gmail.com>
 
        A fix for bug #496922
-       * expression: Always use temporary variable when using object
+       * expression.cs: Always use temporary variable when using object
        initializer.
 
 2009-04-28  Marek Safar  <marek.safar@gmail.com>
index 135af0c3d25563a962ede9350837f351263d459c..0d0d3e655b56a0bb42571f7b7e5bac6039c671d9 100644 (file)
@@ -4214,7 +4214,7 @@ namespace Mono.CSharp {
                                return true;
 
                        if (Parameters.HasExtensionMethodType) {
-                               if (Parent.IsStaticClass && !Parent.IsGeneric) {
+                               if (Parent.PartialContainer.IsStaticClass && !Parent.IsGeneric) {
                                        if (!Parent.IsTopLevel)
                                                Report.Error (1109, Location, "`{0}': Extension methods cannot be defined in a nested class",
                                                        GetSignatureForError ());