"Extract Method" introduces an invalid nullability annotation that results in a nullability issue in the extracted code #61555
Labels
Area-IDE
Concept-Continuous Improvement
Feature - Extract Method
help wanted
The issue is "up for grabs" - add a comment if you are interested in working on it
Projects
Milestone
Version Used:
17.3.0 Preview 1.1
Steps to Reproduce:
Run "Extract Method" on the
c.ToString();
line.Expected Behavior:
The method parameter of the extracted method should be
NewMethod(C c)
.Actual Behavior:
The method parameter of the extracted method is
NewMethod(C? c)
with a nullable annotation. This then results in a nullability warning in the extracted code, because the null check is not in scope anymore.This is likely related to #60552
The text was updated successfully, but these errors were encountered: