Unexpected 'await' at top of other suggestions
See original GitHub issueEnvironment data
dotnet --info
output:
.NET SDK (reflecting any global.json):
Version: 5.0.405
Commit: 63325e1c7d
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.405\
Host (useful for support):
Version: 5.0.14
Commit: d5b56c6327
.NET SDKs installed:
3.1.416 [C:\Program Files\dotnet\sdk]
5.0.303 [C:\Program Files\dotnet\sdk]
5.0.402 [C:\Program Files\dotnet\sdk]
5.0.405 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
VS Code version: 1.65.0 C# Extension version: v1.24.1
Steps to reproduce
- When C# Extension is enabled, open a C# code and try to index an array with, let’s say,
i
- Trigger suggestions (either automatically or manually by the key binding)
Expected behavior
Since it’s the simplest possible suggestion, i
should be the first
Actual behavior
There’s this weird await
keyword suggestions that appears first. This happened on different circumstances, not just when indexing arrays; but this one was the one I could reproduce.
Note that it’s not a snippet suggestion, cuz the snippet setting (put snippets at the bottom, after other suggestions) is not fixing this.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:11
- Comments:6 (2 by maintainers)
Top Results From Across the Web
'await Unexpected identifier' on Node.js 7.5 - Stack Overflow
You can use await only inside of async function s. – Bergi. Feb 14, 2017 at 11:56. 2.
Read more >How to Fix the "Unexpected reserved word (await)" Error in ...
The “unexpected reserved word (await)” error occurs in JavaScript when you use the await keyword in a function that is not specified as ......
Read more >async function expression - JavaScript - MDN Web Docs
The async function keywords can be used to define an async function inside an expression.
Read more >Asynchronous programming: futures, async, await - Dart
This codelab teaches you how to write asynchronous code using futures and the async and await keywords. Using embedded DartPad editors, you can...
Read more >javascript - await does not wait for Promise to finish
@SachinHooda await operator can only be used inside an async function, failing this would throw a runtime error as "Can not use keyword...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, this is a very frustrating issue. Makes writing a simple for loop difficult as the
i
gets auto-replaced to await constantly. Even worse, it also addsasync
in front of the functionI’m experiencing the same issue - reverting to 1.24.0 helps for now