@@ -800,6 +800,55 @@ namespace Microsoft.FSharp.Core
800800/// <c>System.Int64</c>.</summary>
801801type int64 <[< Measure >] 'Measure > = int64
802802
803+ /// <summary>Represents a managed pointer in F# code.</summary>
804+ #if BUILDING_ WITH_ LKG|| BUILD_ FROM_ SOURCE
805+ [<CompilerMessage( " This construct is for use in the FSharp.Core library and should not be used directly" , 1204 , IsHidden= true ) >]
806+ #else
807+ [<CompilerMessage( " This construct is for use in the FSharp.Core library and should not be used directly" , 1204 , IsHidden= true , IsError= true ) >]
808+ #endif
809+ type byref < 'T , 'Kind > = ( #" !0&" #)
810+
811+ /// <summary>Represents a managed pointer in F# code. For F# 4.5+ this is considered equivalent to <c>byref<'T, ByRefKinds.InOut></c></summary>
812+ type byref < 'T > = ( #" !0&" #)
813+
814+ /// Represents the types of byrefs in F# 4.5+
815+ #if BUILDING_ WITH_ LKG|| BUILD_ FROM_ SOURCE
816+ [<CompilerMessage( " This construct is for use in the FSharp.Core library and should not be used directly" , 1204 , IsHidden= true ) >]
817+ #else
818+ [<CompilerMessage( " This construct is for use in the FSharp.Core library and should not be used directly" , 1204 , IsHidden= true , IsError= true ) >]
819+ #endif
820+ module ByRefKinds =
821+
822+ /// Represents a byref that can be written
823+ #if BUILDING_ WITH_ LKG|| BUILD_ FROM_ SOURCE
824+ [<CompilerMessage( " This construct is for use in the FSharp.Core library and should not be used directly" , 1204 , IsHidden= true ) >]
825+ #else
826+ [<CompilerMessage( " This construct is for use in the FSharp.Core library and should not be used directly" , 1204 , IsHidden= true , IsError= true ) >]
827+ #endif
828+ type Out
829+
830+ /// Represents a byref that can be read
831+ #if BUILDING_ WITH_ LKG|| BUILD_ FROM_ SOURCE
832+ [<CompilerMessage( " This construct is for use in the FSharp.Core library and should not be used directly" , 1204 , IsHidden= true ) >]
833+ #else
834+ [<CompilerMessage( " This construct is for use in the FSharp.Core library and should not be used directly" , 1204 , IsHidden= true , IsError= true ) >]
835+ #endif
836+ type In
837+
838+ /// Represents a byref that can be both read and written
839+ #if BUILDING_ WITH_ LKG|| BUILD_ FROM_ SOURCE
840+ [<CompilerMessage( " This construct is for use in the FSharp.Core library and should not be used directly" , 1204 , IsHidden= true ) >]
841+ #else
842+ [<CompilerMessage( " This construct is for use in the FSharp.Core library and should not be used directly" , 1204 , IsHidden= true , IsError= true ) >]
843+ #endif
844+ type InOut
845+
846+ /// <summary>Represents a in-argument or readonly managed pointer in F# code. This type should only be used with F# 4.5+.</summary>
847+ type inref < 'T > = byref< 'T, ByRefKinds.In>
848+
849+ /// <summary>Represents a out-argument managed pointer in F# code. This type should only be used with F# 4.5+.</summary>
850+ type outref < 'T > = byref< 'T, ByRefKinds.Out>
851+
803852/// <summary>Language primitives associated with the F# language</summary>
804853module LanguagePrimitives =
805854
@@ -1097,7 +1146,7 @@ namespace Microsoft.FSharp.Core
10971146/// < param name = "obj "> The input object.< / param>
10981147/// < returns>The managed pointer.< / returns>
10991148[< NoDynamicInvocation> ]
1100- val inline ( ~& ) : obj : 'T -> ' T byref
1149+ val inline ( ~& ) : obj : 'T -> byref<'T>
11011150
11021151/// < summary>Address - of. Uses of this value may result in the generation of unverifiable code.< / summary>
11031152/// < param name = "obj "> The input object.< / param>
@@ -1659,24 +1708,6 @@ namespace Microsoft.FSharp.Core
16591708/// < returns>The optimized function.< / returns>
16601709new : unit -> FSharpFunc<'T1 , 'T2 , 'T3 , 'T4 , 'T5 , 'U>
16611710
1662- /// Represents the types of byrefs in F #4.5 +
1663- module ByRefKinds =
1664-
1665- /// Represents a byref that can be written
1666- type Out = class end
1667-
1668- /// Represents a byref that can be read
1669- type In = class end
1670-
1671- /// Represents a byref that can be both read and written
1672- type InOut = Choice<In , Out>
1673-
1674- /// < summary>Represents a in - argument or readonly managed pointer in F #code. This type should only be used with F #4.5 +.</ summary>
1675- type inref<'T> = byref<'T , ByRefKinds.In>
1676-
1677- /// < summary>Represents a out - argument managed pointer in F #code. This type should only be used with F #4.5 +.</ summary>
1678- type outref<'T> = byref<'T , ByRefKinds.Out>
1679-
16801711/// < summary>The type of mutable references. Use the functions [!] and [:=] to get and
16811712/// set values of this type.< / summary>
16821713[< StructuralEquality ; StructuralComparison> ]