diff --git a/src/fsharp/FSharp.Core/reflect.fs b/src/fsharp/FSharp.Core/reflect.fs index b9a10403eae..d028dc8b80f 100644 --- a/src/fsharp/FSharp.Core/reflect.fs +++ b/src/fsharp/FSharp.Core/reflect.fs @@ -631,11 +631,7 @@ module internal Impl = let getRecordConstructorMethod(typ: Type, bindingFlags) = let props = fieldPropsOfRecordType(typ, bindingFlags) -#if FX_RESHAPED_REFLECTION - let ctor = typ.GetConstructor(props |> Array.map (fun p -> p.PropertyType)) -#else let ctor = typ.GetConstructor(BindingFlags.Instance ||| bindingFlags, null, props |> Array.map (fun p -> p.PropertyType), null) -#endif match ctor with | null -> raise <| ArgumentException (String.Format (SR.GetString (SR.invalidRecordTypeConstructorNotDefined), typ.FullName)) | _ -> () @@ -644,11 +640,7 @@ module internal Impl = let getRecordConstructor(typ: Type, bindingFlags) = let ctor = getRecordConstructorMethod(typ, bindingFlags) (fun (args: obj[]) -> -#if FX_RESHAPED_REFLECTION - ctor.Invoke args) -#else ctor.Invoke(BindingFlags.InvokeMethod ||| BindingFlags.Instance ||| bindingFlags, null, args, null)) -#endif /// EXCEPTION DECOMPILATION // Check the base type - if it is also an F# type then