473,385 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Incorrect error report. Is member lookup for delegate simple-names (in error-case) corresponding to standart?

Look at example:

namespace N
{
class A { public void v() {}}
class B : A { new public const int v = 10; }
class C : B { new public void v ( int a ) {}}
class D : C
{
delegate void fun();
void f()
{
fun d = new fun ( v ); // refers B.v and produce error CS0118,
must be: refers to C.v() and produce error CS0123
}
}
}

There v in delegate creation expression refers to B.v and produce error
CS0118. It looks like member-lookup algorithm skip C.v() function because
formal arguments not applicable to delegate formal parameters. But standart
say that (14.3, p. 129): "If M is a method, then all non-method members
declared in a base type of S are removed from the set, and all methods with
the same signature as M declared in a base type of S are removed from the
set.", i.e. B.v must be hidden by C.v(). Probably v must refers to C.v() and
produce error CS0123? Or I something missing?

Alex.
Nov 16 '05 #1
0 876

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ondrej Spanel | last post by:
The code below does not compile with .NET 2003, I get folowing error: w:\c\Pokusy\delegTemplArg\delegTemplArg.cpp(11) : error C2993: 'float' : illegal type for non-type template parameter 'x' ...
1
by: Pavils Jurjans | last post by:
Hello, When developing on the local host, asp.net provides detailed runtime error information - error number, description, and even line of code where the error happened. When the aspx page is...
0
by: ketan | last post by:
Hi, While understanding name lookup using item 32 of EC++ ( Sutter ), i found error from gcc bit unclear. It will be great if anyone can help me. In short - compiler complains about...
3
by: sklett | last post by:
You know when an application crashes and it will popup that dialog that asks you if you want to send an error report? What is that called? I want to add that to my applications, but I'm not find...
2
by: ads | last post by:
we have just migrated to a new server both with database and web server- migrating all web projects and all databases.then we decided to rename the new server.we tried running all web projects on...
4
by: Neelesh2007 | last post by:
I am using Datareport in a VB6.0 project with Access as backend. My code work fine with my PC. Also I have installed the project in several other PC's. (I have created setup with Visual Studio...
1
by: =?Utf-8?B?RXJyb3JSZXBvcnQxMDE=?= | last post by:
While trying to wipe my computers free space with BCwipe software my computer generates an error report in the middle of the wipe. I am not able to search for the file eaither without another error...
0
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, My C# application trys to access directorycontext during Form loading. Try and Catch if there is an exception. I then output an error message and then "this.Close();" to exit the...
1
by: dzgreek | last post by:
I use VB6 and for the first time its Data Report designer - I am using it without a data environment and I set my reports datasource property within my code. All I ever get is this error message...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.