bugDotGNU Portable.NET - Bugs: bug #9851, type-resolving at runtime not...

 
 

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

bug #9851: type-resolving at runtime not always correct

Submitted by:  None
Submitted on:  Mon 02 Aug 2004 07:37:12 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Works For Me
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 29 Oct 2004 04:19:41 PM UTC, comment #2:

Can't reproduce this behaviour in any of my samples.

Closing this bug as being too long without any steps towards investigation

Gopal.V <t3rmin4t0r>
Project Administrator
Tue 03 Aug 2004 09:28:05 AM UTC, comment #1:

At least the original code would have been a help.

Right now I'm up a creek without a paddle...

Anonymous
Mon 02 Aug 2004 07:37:12 PM UTC, original submission:

Working on a little project, I encountered the following
misbehaviour of pnet (most probably ilrun):

I have a reference of an interface type, which I pass
around through some events and methods.
And at some point in the code I want to cast it back
to a class type. But the "is" operator doesn't return
true for the class and casting without checking
throws an exception.
The class overrides the ToString() method, so I can check
that the object is really an instance of this class, and
just before trying to cast, the right ToString() method
is invoked.

The method which tries to cast looks something like:

public void DoSomething(IBlabla obj)
{
// ToString() of class SomeClass is invoked
Console.WriteLine(obj);
if(obj is SomeClass)
{
// This block is never executed...
// strange but true
Console.WriteLine("obj is of type SomeClass");
}
}

Sorry, but I couldn't track it down to a simple test.

Anonymous

 

No files currently attached

 

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 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 29 Oct 2004 04:19:41 PM UTCt3rmin4t0rStatusNone=>Works For Me
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1