Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace not reduced within if debug statement #6160

Open
live1206 opened this issue Feb 26, 2025 · 0 comments
Open

Namespace not reduced within if debug statement #6160

live1206 opened this issue Feb 26, 2025 · 0 comments
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Comments

@live1206
Copy link
Contributor

live1206 commented Feb 26, 2025

When creates a method invoke within a if debug block as

new IfElsePreprocessorStatement("DEBUG", Static(Type).Invoke(MethodName, parameter).Terminate(), null)

The generated code in MGC doesn't reduce the namespace of Type above.

#if DEBUG
            global::MgmtTypeSpec.FooResource.ValidateResourceId(id);
#endif
@live1206 live1206 added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp
Projects
None yet
Development

No branches or pull requests

1 participant