SA1200 Using directive should appear within a namespace declaration
daleao opened this issue · comments
daleao commented
Conflicts with CS8914 Error: A global using directive cannot be used in a namespace declaration.
Björn Hellander commented
Could you provide an example so your situation is clear?
daleao commented
This causes SA1200:
global using static Foo.Bar;
namespace Foo;
using System;
class Bar {}
This causes CS8914:
namespace Foo;
global using static Foo.Bar;
using System;
class Bar {}
SA1200 is incorrectly applying to global using statements, which cannot be placed within namespace declarations.
Björn Hellander commented
Duplicate of #3404 (still open)
Sam Harwell commented
Duplicate of #3404