Vscode-cpptools: Designated initializers not working on file scope

Created on 14 Oct 2020  路  3Comments  路  Source: microsoft/vscode-cpptools

Describe the bug

When defining a struct at file scope, the Designated initializers do not work (often). Sometimes and for some structs they actually work but for some other types they don't. However, for the structs that they do not work, they will work if we define the variable inside a function. I've created a very simple example where I could experience this issue (screenshots below).

  • OS and Version: Ubuntu Mate 20.04
  • VS Code Version: 1.50
  • C/C++ Extension Version: 1.1.0-insiders

Expected behavior
Structs members to appear in the auto complete list

Screenshots
image

image

Auto-complete Language Service Visual Studio bug

Most helpful comment

The bug repros with VS (i.e. due to our shared code) and has been reported at https://developercommunity.visualstudio.com/content/problem/1223052/c-intellisense-doesnt-work-for-designated-initiali.html .

All 3 comments

Hi @nunojsa . Thanks for reporting this. I believe this is the same issue as: https://github.com/microsoft/vscode-cpptools/issues/4966

The bug repros with VS (i.e. due to our shared code) and has been reported at https://developercommunity.visualstudio.com/content/problem/1223052/c-intellisense-doesnt-work-for-designated-initiali.html .

Same problem here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

peterwoods1 picture peterwoods1  路  3Comments

DemoCrazer picture DemoCrazer  路  3Comments

montery8 picture montery8  路  3Comments

jrieken picture jrieken  路  3Comments

arl picture arl  路  3Comments