Feedback
Await Task.Delay(...) now compiles as a standalone statement
- Status
- Fixed
- Fixed in
- v26.8.4
- Source discussion
- https://forum.objo.dev/d/795-doc-error-for-delay
- Last updated
- 2026-08-17
Upvotes
0 upvotes
Uses your Objo forum account.
Public summary
The documented Await Task.Delay(Duration) example did not compile as a standalone statement. Writing Await Task.Delay(2.Seconds()) inside an Async method reported "Expression result is unused. Only calls, assignments, and New are valid as statements.", so users could not write the documented delay idiom and had to work around it with Var ignored As Task = Await Task.Delay(...). Await is now accepted as a standalone statement, matching the Async/Await specification.