diff --git a/src/System.Management.Automation/engine/parser/Compiler.cs b/src/System.Management.Automation/engine/parser/Compiler.cs index 153d409b6c..c6159b1fe8 100644 --- a/src/System.Management.Automation/engine/parser/Compiler.cs +++ b/src/System.Management.Automation/engine/parser/Compiler.cs @@ -1097,7 +1097,7 @@ namespace System.Management.Automation.Language } } - private static (string name, ExperimentAction action) GetFeatureNameAndAction(AttributeAst ast) + private static (string, ExperimentAction) GetFeatureNameAndAction(AttributeAst ast) { var argValue0 = ast.PositionalArguments[0].Accept(s_cvv); var argValue1 = ast.PositionalArguments[1].Accept(s_cvv); @@ -1169,7 +1169,7 @@ namespace System.Management.Automation.Language "MethodCountCouldNotFindBest", ExtendedTypeSystem.MethodArgumentCountException, ".ctor", positionalArgCount); } - var (name, action) = GetFeatureNameAndAction(ast); + (string name, ExperimentAction action) = GetFeatureNameAndAction(ast); return new ExperimentalAttribute(name, action); } @@ -1183,7 +1183,7 @@ namespace System.Management.Automation.Language result = new ParameterAttribute(); break; case 2: - var (name, action) = GetFeatureNameAndAction(ast); + (string name, ExperimentAction action) = GetFeatureNameAndAction(ast); result = new ParameterAttribute(name, action); break; default: diff --git a/test/powershell/engine/ExperimentalFeature/assets/ExpTest/ExpTest.cs b/test/powershell/engine/ExperimentalFeature/assets/ExpTest/ExpTest.cs index 20e25bbd85..a73b649f48 100644 --- a/test/powershell/engine/ExperimentalFeature/assets/ExpTest/ExpTest.cs +++ b/test/powershell/engine/ExperimentalFeature/assets/ExpTest/ExpTest.cs @@ -59,7 +59,7 @@ namespace ExperimentalFeatureTest protected override void EndProcessing() { string message = $"Hello World {Name}."; - if (ExperimentalFeature.HasEnabled("ExpTest.FeatureOne")) + if (ExperimentalFeature.IsEnabled("ExpTest.FeatureOne")) { if (SwitchOne.IsPresent) { message += "-SwitchOne is on."; } if (SwitchTwo.IsPresent) { message += "-SwitchTwo is on."; }