-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
changelog:fixedSomething isn't working (SemVer:PATCH)Something isn't working (SemVer:PATCH)scope:enumC# enumeration typesC# enumeration typestype:fixFix/patch a bug (this correlates with PATCH in Semantic Versioning)Fix/patch a bug (this correlates with PATCH in Semantic Versioning)
Milestone
Description
During testing of #9 via PR #10 we noticed that
using System;
using static System.Enum;
_ = GetName(DateTimeKind.Utc);
_ = IsDefined(DateTimeKind.Utc);
does not generate an Interceptor.
However, C# 12.0-style Interceptors do support static method invocations without qualifying the type name when a respective using static directive
imports static members (and nested types).
Above user code should emit
[InterceptsLocation(@"..\Program.cs", 4, 5)]
internal static string? GetName(global::System.DateTimeKind value);
[InterceptsLocation(@"..\Program.cs", 5, 5)]
internal static bool IsDefined(global::System.DateTimeKind value)
Metadata
Metadata
Assignees
Labels
changelog:fixedSomething isn't working (SemVer:PATCH)Something isn't working (SemVer:PATCH)scope:enumC# enumeration typesC# enumeration typestype:fixFix/patch a bug (this correlates with PATCH in Semantic Versioning)Fix/patch a bug (this correlates with PATCH in Semantic Versioning)