Skip to content

Commit 0ff6ac4

Browse files
committed
Fix FSharp.Core operators
1 parent 31710a2 commit 0ff6ac4

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/FSharp.Core/prim-types.fs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,10 +643,11 @@ namespace Microsoft.FSharp.Core
643643
//-------------------------------------------------------------------------
644644
// Lazy and/or. Laziness added by the F# compiler.
645645

646-
let (&) e1 e2 = if e1 then e2 else false
646+
[<CompiledName("op_Amp")>]
647+
let __obsoleteAnd e1 e2 = if e1 then e2 else false
647648
let (&&) e1 e2 = if e1 then e2 else false
648649
[<CompiledName("Or")>]
649-
let (or) e1 e2 = if e1 then true else e2
650+
let __obsoleteOr e1 e2 = if e1 then true else e2
650651
let (||) e1 e2 = if e1 then true else e2
651652

652653
//-------------------------------------------------------------------------
@@ -723,7 +724,7 @@ namespace Microsoft.FSharp.Core
723724

724725
// worst case: nothing known about source or destination
725726
let UnboxGeneric<'T>(source: objnull) =
726-
if notnullPrim(source) or TypeInfo<'T>.TypeInfo <> TypeNullnessSemantics_NullNotLiked then
727+
if notnullPrim(source) || TypeInfo<'T>.TypeInfo <> TypeNullnessSemantics_NullNotLiked then
727728
unboxPrim<'T>(source)
728729
else
729730
//System.Console.WriteLine("UnboxGeneric, x = {0}, 'T = {1}", x, typeof<'T>)

src/FSharp.Core/prim-types.fsi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,9 +1733,10 @@ namespace Microsoft.FSharp.Core
17331733
module IntrinsicOperators =
17341734

17351735
/// <summary>Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand.</summary>
1736+
[<CompiledName("op_Amp")>]
17361737
[<Obsolete("This construct is deprecated. Use 'e1 && e2' instead.", true)>]
17371738
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
1738-
val (&): e1: bool -> e2: bool -> bool
1739+
val __obsoleteAnd: e1: bool -> e2: bool -> bool
17391740

17401741
/// <summary>Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand</summary>
17411742
///
@@ -1749,7 +1750,7 @@ namespace Microsoft.FSharp.Core
17491750
[<CompiledName("Or")>]
17501751
[<Obsolete("This construct is deprecated. Use 'e1 || e2' instead.", true)>]
17511752
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
1752-
val (or): e1: bool -> e2: bool -> bool
1753+
val __obsoleteOr: e1: bool -> e2: bool -> bool
17531754

17541755
/// <summary>Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand</summary>
17551756
///

0 commit comments

Comments
 (0)