bugDotGNU Portable.NET - Bugs: bug #2803, C# Compiler:: Ambigous typecast vs...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #2803: C# Compiler:: Ambigous typecast vs delegate in brackets

Submitted by:  Gopal.V <t3rmin4t0r>
Submitted on:  Wed 12 Mar 2003 04:14:53 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: None
Open/Closed: Closed

Sat 05 Jul 2003 01:02:54 AM UTC, comment #1:

csc also gets confused, thinking that the construct is a
cast instead of an invocation. It even complains that "cb"
is not declared because it is trying to locate it as a
type. I'm surprised that SDL.NET compiles at all if
it is using code like this. More information required
before I can go further with this.

ambiguity.cs(7,27): error CS0246: The type or namespace name 'cb' could not be found (are you missing a using directive or an assembly reference?)
ambiguity.cs(8,18): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
ambiguity.cs(8,18): error CS0246: The type or namespace name 'cb' could not be found (are you missing a using directive or an assembly reference?)

Rhys Weatherley <rweather>
Project Administrator
Wed 12 Mar 2003 04:14:53 PM UTC, original submission:

The compiler fails to realize

(cb)(null);

is the call of the delegate cb with args null.

and one case throws a parser error as well ?.

(From SDL.net code ...)

Gopal.V <t3rmin4t0r>
Project Administrator

 

Attached Files
file #347:  ambiguity.cs added by t3rmin4t0r (152B - application/octet-stream - test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 05 Jul 2003 01:02:54 AM UTCrweatherStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)
Wed 28 May 2003 10:30:11 PM UTCrweatherAssigned torweather=>NA
Fri 14 Mar 2003 01:07:16 AM UTCrweatherAssigned toNone=>NA

Back to the top


Powered by Savane 3.1-cleanup1