Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Issue 9312 - With statement diagnostic is wrong #1479
It only lists class and struct instances as possible expressions, but there are many more: class and struct types, template instances, enumerations, modules, etc. To avoid listing all possible types it's best to just state the type which can't be used.