Bug 2160 - Protected method in abstract class not identified when compiling bounce castle.
Summary: Protected method in abstract class not identified when compiling bounce castle.
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2011-11-22 13:49 UTC by Peter Hultqvist
Modified: 2011-11-23 09:18 UTC (History)
1 user (show)

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


Attachments
Complete source file in which the error occurred(from Bouncy Castle 1.7) (33.32 KB, text/x-csharp)
2011-11-22 13:49 UTC, Peter Hultqvist
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 Peter Hultqvist 2011-11-22 13:49:09 UTC
Created attachment 933 [details]
Complete source file in which the error occurred(from Bouncy Castle 1.7)

I am trying to compile Bouncey Castle 1.7-ext(http://www.bouncycastle.org/csharp/)
With Mono JIT compiler version 2.10.5 (Debian 2.10.5-1)

It returns this error:

.../csharp/crypto/src/math/ec/ECFieldElement.cs(150,51): error CS1540: Cannot access protected member `Org.BouncyCastle.Math.EC.ECFieldElement.Equals(Org.BouncyCastle.Math.EC.ECFieldElement)' via a qualifier of type `Org.BouncyCastle.Math.EC.ECFieldElement'. The qualifier must be of type `Org.BouncyCastle.Math.EC.FpFieldElement' or derived from it
.../csharp/crypto/src/math/ec/ECFieldElement.cs(36,32): (Location of the symbol related to previous error)

All code is in the file .../csharp/crypto/src/math/ec/ECFieldElement.cs

The line causing the error(150) is located in a method in a (public class FpFieldElement : ECFieldElement):
	return z.Square().Equals(this) ? z : null;

The ECFieldElement looks like this(Attached complete file):

	public abstract class ECFieldElement
	{
		...
		public abstract ECFieldElement Sqrt();
		public override bool Equals(object obj)	{...}
		protected bool Equals(ECFieldElement other){...}
		...
	}
Comment 1 Marek Safar 2011-11-23 09:18:46 UTC
Fixed in master