Bug 316958 (MONO71582) - [PATCH] mcs/gmcs partial types with a destructor fail to compile
Summary: [PATCH] mcs/gmcs partial types with a destructor fail to compile
Status: RESOLVED FIXED
Alias: MONO71582
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Major
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-21 20:56 UTC by Alp Toker
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Patch to mcs to permit a destructor in a partial type (1.01 KB, patch)
2005-01-21 21:02 UTC, Thomas Wiest
Details | Diff
Patch to gmcs to permit a destructor in a partial type (1.01 KB, patch)
2005-01-21 21:03 UTC, Thomas Wiest
Details | Diff
Test case for a destructor in a partial type (1.44 KB, patch)
2005-01-21 21:13 UTC, Thomas Wiest
Details | Diff
[UPDATE] Actual patch to gmcs (previous was just a dupe of the mcs patch) (1.03 KB, patch)
2005-01-22 11:33 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:04:46 UTC


---- Reported by alp@atoker.com 2005-01-21 13:56:56 MST ----

mcs/gmcs fail to compile:

  public partial class Window : Gtk.Bin {
    ~Window()
    {
      Dispose();
    }

./src/gtk-src/Window.cs(16) error CS0575: Destructors are only allowed in
class types

The attached patches to the parser jay source fix the problem. Test case
also provided.



---- Additional Comments From alp@atoker.com 2005-01-21 14:02:34 MST ----

Created an attachment (id=167288)
Patch to mcs to permit a destructor in a partial type




---- Additional Comments From alp@atoker.com 2005-01-21 14:03:09 MST ----

Created an attachment (id=167289)
Patch to gmcs to permit a destructor in a partial type




---- Additional Comments From alp@atoker.com 2005-01-21 14:13:00 MST ----

Created an attachment (id=167290)
Test case for a destructor in a partial type




---- Additional Comments From alp@atoker.com 2005-01-22 04:33:44 MST ----

Created an attachment (id=167291)
[UPDATE] Actual patch to gmcs (previous was just a dupe of the mcs patch)




---- Additional Comments From miguel@ximian.com 2005-01-22 19:27:01 MST ----

Patch applied.

Imported an attachment (id=167288)
Imported an attachment (id=167289)
Imported an attachment (id=167290)
Imported an attachment (id=167291)

Unknown operating system unknown. Setting to default OS "Other".