Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Find references for C# 8.0 nullable ref types
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mkoe
Junior Member

13 Posts

Posted - Sep 18 2020 :  07:34:37 AM  Show Profile  Reply with Quote
Find references doesn't find class methods of an instance of a nullable reference type.

Let's say we have the following class:

public class Foo
{
    public void Bar() {}
}

and the following part of code:

Foo? foo;
foo.Bar();

If we use "Find References" on Bar in the class definition, the call to Bar on the nullable reference instance is not found. "Find References" on the method call also does not work.

If we remove "?" everything works fine.

Edited by - mkoe on Sep 18 2020 07:38:14 AM

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Sep 21 2020 :  12:09:42 PM  Show Profile  Reply with Quote
I am seeing the same problem here, thank you for the fairly clear description I had to go and read up on nullable to make sense of what is going on here, but I see the problem clearly now, and I have put in a bug report for this:

case=142889

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000