diff --git a/src/Compiler/TypedTree/TcGlobals.fs b/src/Compiler/TypedTree/TcGlobals.fs index 77ba385c520..340c1a1c5e7 100755 --- a/src/Compiler/TypedTree/TcGlobals.fs +++ b/src/Compiler/TypedTree/TcGlobals.fs @@ -9,6 +9,7 @@ module internal FSharp.Compiler.TcGlobals open System.Collections.Concurrent +open System.Linq open System.Diagnostics open Internal.Utilities.Library @@ -1052,7 +1053,7 @@ type TcGlobals( member _.embeddedTypeDefs = embeddedILTypeDefs.Values |> Seq.toList member _.tryRemoveEmbeddedILTypeDefs () = [ - for key in embeddedILTypeDefs.Keys do + for key in embeddedILTypeDefs.Keys.OrderBy(fun k -> k) do match (embeddedILTypeDefs.TryRemove(key)) with | true, ilTypeDef -> yield ilTypeDef | false, _ -> ()