Skip to content

Commit 3cc300d

Browse files
ncavealfonsogarciacaro
authored andcommitted
Fixed default comparer (#658)
1 parent acd016e commit 3cc300d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fable/Fable.Compiler/Replacements.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ module Util =
433433
&& ent.FullName <> "System.TimeSpan"
434434
&& ent.FullName <> "System.DateTime" ->
435435
[emitNoInfo "(x,y) => x.CompareTo(y)" []]
436-
| Some _ -> [emitNoInfo "(x,y) => x < y ? -1 : x > y ? 1 : 0" []]
436+
| Some _ -> [makeCoreRef "Util" (Some "compare")]
437437
|> fun args -> CoreLibCall("GenericComparer", None, true, args)
438438
|> makeCall None Fable.Any
439439

0 commit comments

Comments
 (0)