microsoft / microsoft/vscode-cpptools

Extract to function is available on `= <expr>` for a declaration and generates invalid code

Offen
#11,458 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@sean-mcmanus arbeitet bereits daran.

Seit 22.9.2023.

bug Feature: Extract to function insiders Language Service Visual Studio
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

Use Extract to function on the code below with the selection shown in the screenshot (= <expr> for a declaration).

int main()
{
    int i = 0;
    return i;
}
image

Bug: It generates invalid code. It should show the "Expand selection" command, like it does for an assignment instead of a definition initialization. The bug repros with VS too.

image

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.