diff --git a/src/fsharp/FSharp.Core/prim-types.fs b/src/fsharp/FSharp.Core/prim-types.fs index d0d608f119..36567214f1 100644 --- a/src/fsharp/FSharp.Core/prim-types.fs +++ b/src/fsharp/FSharp.Core/prim-types.fs @@ -3791,10 +3791,6 @@ namespace Microsoft.FSharp.Core [] let (|Failure|_|) (error: exn) = if error.GetType().Equals(typeof) then Some error.Message else None - [] - let inline not (value: bool) = (# "ceq" value false : bool #) - - let inline (<) x y = GenericLessThan x y let inline (>) x y = GenericGreaterThan x y let inline (>=) x y = GenericGreaterOrEqual x y @@ -4743,6 +4739,9 @@ namespace Microsoft.FSharp.Core [] let id x = x + [] + let inline not (value: bool) = match value with true -> false | _ -> true + // std* are TypeFunctions with the effect of reading the property on instantiation. // So, direct uses of stdout should capture the current System.Console.Out at that point. [] diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Seq_for_all01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Seq_for_all01.il.bsl index 5ccceb2646..8474b30c00 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Seq_for_all01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Seq_for_all01.il.bsl @@ -69,28 +69,33 @@ .method public strict virtual instance bool Invoke(int32 s) cil managed { - // Code size 14 (0xe) + // Code size 18 (0x12) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 5,5 : 31,47 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\Misc\\Seq_for_all01.fs' IL_0000: ldc.i4.1 - IL_0001: brtrue.s IL_0005 + IL_0001: ldc.i4.0 + IL_0002: ceq + .line 100001,100001 : 0,0 '' + IL_0004: nop + .line 100001,100001 : 0,0 '' + IL_0005: brfalse.s IL_0009 - IL_0003: br.s IL_0007 + IL_0007: br.s IL_000b - IL_0005: br.s IL_000b + IL_0009: br.s IL_000f .line 5,5 : 48,50 '' - IL_0007: nop + IL_000b: nop .line 100001,100001 : 0,0 '' - IL_0008: nop - IL_0009: br.s IL_000c + IL_000c: nop + IL_000d: br.s IL_0010 .line 100001,100001 : 0,0 '' - IL_000b: nop + IL_000f: nop .line 6,6 : 31,35 '' - IL_000c: ldc.i4.1 - IL_000d: ret + IL_0010: ldc.i4.1 + IL_0011: ret } // end of method q@4::Invoke } // end of class q@4