Skip to content

Commit 4f09abc

Browse files
committed
Fix more global::-unprefixed type names
1 parent af335c3 commit 4f09abc

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Extensions/DesignTimeDirectivePass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public override void VisitClassDeclaration(ClassDeclarationIntermediateNode node
5252
new IntermediateToken()
5353
{
5454
Kind = TokenKind.CSharp,
55-
Content = $"private static {typeof(object).FullName} {DesignTimeVariable} = null;",
55+
Content = $"private static object {DesignTimeVariable} = null;",
5656
}
5757
}
5858
});

src/Compiler/Microsoft.AspNetCore.Razor.Language/src/Extensions/DesignTimeDirectiveTargetExtension.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ private void WriteDesignTimeDirectiveToken(CodeRenderingContext context, DesignT
5454
}
5555

5656
// Wrap the directive token in a lambda to isolate variable names.
57-
context.CodeWriter
58-
.Write("((")
59-
.Write(typeof(Action).FullName)
60-
.Write(")(");
57+
context.CodeWriter.Write("((global::System.Action)(");
6158
using (context.CodeWriter.BuildLambda())
6259
{
6360
var originalIndent = context.CodeWriter.CurrentIndent;

0 commit comments

Comments
 (0)