From 24a2a523d0adaeb1282a81b56f56e7abd813cb48 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sat, 22 Jan 2005 23:20:01 +0000 Subject: [PATCH] 2005-01-21 Alp Toker * 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 | 5 +++++ mcs/gmcs/cs-parser.jay | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mcs/gmcs/ChangeLog b/mcs/gmcs/ChangeLog index 52186c64458..16455ef6f18 100644 --- a/mcs/gmcs/ChangeLog +++ b/mcs/gmcs/ChangeLog @@ -1,3 +1,8 @@ +2005-01-21 Alp Toker + + * 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 * expression.cs (Unary.TryReduceNegative): Added support for diff --git a/mcs/gmcs/cs-parser.jay b/mcs/gmcs/cs-parser.jay index 197551d8dcc..3e31f506ac7 100644 --- a/mcs/gmcs/cs-parser.jay +++ b/mcs/gmcs/cs-parser.jay @@ -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; -- 2.25.1