diff --git a/src/System.Management.Automation/engine/parser/PreOrderVisitor.cs b/src/System.Management.Automation/engine/parser/PreOrderVisitor.cs
index 0bf5368fddb..33b2fadec64 100644
--- a/src/System.Management.Automation/engine/parser/PreOrderVisitor.cs
+++ b/src/System.Management.Automation/engine/parser/PreOrderVisitor.cs
@@ -254,6 +254,7 @@ public abstract class AstVisitor2 : AstVisitor
/// Implement this interface when you implement or when
/// you want to do something after possibly visiting the children of the ast.
///
+#nullable enable
public interface IAstPostVisitHandler
{
///