diff --git a/src/System.Management.Automation/engine/parser/Compiler.cs b/src/System.Management.Automation/engine/parser/Compiler.cs index 67a00ab249..72ede0a445 100644 --- a/src/System.Management.Automation/engine/parser/Compiler.cs +++ b/src/System.Management.Automation/engine/parser/Compiler.cs @@ -412,7 +412,7 @@ namespace System.Management.Automation.Language internal static readonly ConstructorInfo StreamReader_ctor = typeof(StreamReader).GetConstructor(new Type[] { typeof(string) }); internal static readonly MethodInfo StreamReader_ReadLine = - typeof(StreamReader).GetMethod(nameof(StreamReader.ReadLine)); + typeof(StreamReader).GetMethod(nameof(StreamReader.ReadLine), Type.EmptyTypes); internal static readonly ConstructorInfo String_ctor_char_int = typeof(string).GetConstructor(new Type[] { typeof(char), typeof(int) });