Bug 33879 - System.Delegate and Action equality fails on virtual methods
Summary: System.Delegate and Action equality fails on virtual methods
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Ludovic Henry
URL:
Depends on:
Blocks:
 
Reported: 2015-09-11 05:02 UTC by Piotr Zierhoffer
Modified: 2015-09-17 12:50 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Failing test (597 bytes, text/x-csharp)
2015-09-11 05:02 UTC, Piotr Zierhoffer
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Piotr Zierhoffer 2015-09-11 05:02:07 UTC
Created attachment 12869 [details]
Failing test

As a follow up to #33218 we have discovered that delegate and action equality won't work for virtual methods. The example is almost the same.

Steps to reproduce:

mcs Program.cs
mono Program.exe

Expected output:
================

True
True

Actual output:
==============

False
False

If there is no overriden method in DerivedClass, the output is good.

We believe that the differing field is Delegate.method.

Works on .net.
Comment 1 Ludovic Henry 2015-09-17 12:48:48 UTC
That is fixed with https://github.com/mono/mono/commit/53a64922090b09aed19225eaadf3481e08a15914