It looks like some consumers of IsContainedInNamespace helper fail to check expected arity of the type
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
For example,
```
internal static bool IsWellKnownTypeInAttribute(this TypeSymbol typeSymbol)
=> typeSymbol.IsWellKnownInteropServicesTopLevelType("InAttribute");
internal static bool IsWellKnownTypeRequiresLocationAttribute(this TypeSymbol typeSymbol)
=> typeSymbol.IsWellKnownCompilerServicesTopLevelType("RequiresLocationAttribute");
internal static bool IsWellKnownTypeUnmanagedType(this TypeSymbol typeSymbol)
=> typeSymbol.IsWellKnownInteropServicesTopLevelType("UnmanagedType");
internal static bool IsWellKnownTypeIsExternalInit(this TypeSymbol typeSymbol)
=> typeSymbol.IsWellKnownCompilerServicesTopLevelType("IsExternalInit");
```
Probably there are other consumers like that as well.
Contributor guide
Research direction
Start by locating IsContainedInNamespace and its consumers, including IsWellKnownInteropServicesTopLevelType and IsWellKnownCompilerServicesTopLevelType. Inspect each consumer's expected type arity handling and compare it with the examples in the issue. Done means all affected consumers check the expected arity consistently, with relevant compiler tests passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100