2005-01-21 Alp Toker <alp@atoker.com>
authorMiguel de Icaza <miguel@gnome.org>
Sat, 22 Jan 2005 23:20:01 +0000 (23:20 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sat, 22 Jan 2005 23:20:01 +0000 (23:20 -0000)
* cs-parser.jay: destructor_declaration's container is PartialContainer
not Class when partial types are used, so use Kind prop instead of 'is'.

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

mcs/gmcs/ChangeLog
mcs/gmcs/cs-parser.jay

index 52186c64458c59ae368fc83268ea0da8864089d2..16455ef6f18013a2434820585a5e4798bd97d519 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-21  Alp Toker  <alp@atoker.com>
+
+       * cs-parser.jay: destructor_declaration's container is PartialContainer
+       not Class when partial types are used, so use Kind prop instead of 'is'.
+
 2004-12-12  Martin Baulig  <martin@ximian.com>
 
        * expression.cs (Unary.TryReduceNegative): Added support for
index 197551d8dcc43dcd4d01ec07d2a2e5f7e7e57609..3e31f506ac738a4fa32fa5a9a214758ecf39065d 100644 (file)
@@ -1963,7 +1963,7 @@ destructor_declaration
          {
                if ((string) $5 != current_container.Basename){
                        Report.Error (574, lexer.Location, "Name of destructor must match name of class");
-               } else if (!(current_container is Class)){
+               } else if (current_container.Kind != Kind.Class){
                        Report.Error (575, lexer.Location, "Destructors are only allowed in class types");
                } else {
                        Location l = lexer.Location;