Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Find references for C# 8.0 nullable ref types

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
mkoe Posted - Sep 18 2020 : 07:34:37 AM
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.
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Sep 21 2020 : 12:09:42 PM
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

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000