You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, everyone! I've noticed a really strange behavior from the compiler. It occurred when I used a simplified using statement that looked like this:
using const var obj = new Object();
The compiler didn't flag any errors as it should have. It's strange because with the normal version
using (const var obj = new Object())
the compiler correctly flagged a "CS0822" and a "CS1525". It's as if the compiler ignores errors in simplified using statements.
Expected Behavior:
The compiler should flag a "CS0822" and a "CS1525". Actual Behavior:
The compiler doesn't flag any errors and when you try to build the application, it finishes with:
(Visual Studio)
Version Used: .NET 8.0.201
Hello, everyone! I've noticed a really strange behavior from the compiler. It occurred when I used a simplified
using
statement that looked like this:The compiler didn't flag any errors as it should have. It's strange because with the normal version
the compiler correctly flagged a
"CS0822"
and a"CS1525"
. It's as if the compiler ignores errors in simplifiedusing
statements.Expected Behavior:
The compiler should flag a
"CS0822"
and a"CS1525"
.Actual Behavior:
The compiler doesn't flag any errors and when you try to build the application, it finishes with:
(Visual Studio)
or
(Visual Studio Code)
The text was updated successfully, but these errors were encountered: