microsoft / microsoft/typespec

Namespace not reduced within if debug statement

Open
#6,160 2 comments 0 reactions 0 assignees View on GitHub
emitter:client:csharp
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.