Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master to fsharp5 #6523

Merged
1 commit merged into from
Apr 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/fsharp/FSharp.Core/collections.fs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace Microsoft.FSharp.Collections
member __.Equals(x,y) = LanguagePrimitives.PhysicalEquality x y }

let inline NonStructural< 'T when 'T : equality and 'T : (static member ( = ) : 'T * 'T -> bool) > =
{ new IEqualityComparer< 'T > with
{ new IEqualityComparer<'T> with
member __.GetHashCode(x) = NonStructuralComparison.hash x
member __.Equals(x, y) = NonStructuralComparison.(=) x y }

Expand All @@ -39,7 +39,7 @@ namespace Microsoft.FSharp.Collections
let inline Structural<'T when 'T : comparison > : IComparer<'T> =
LanguagePrimitives.FastGenericComparer<'T>

let inline NonStructural< 'T when 'T : (static member ( < ) : 'T * 'T -> bool) and 'T : (static member ( > ) : 'T * 'T -> bool) > : IComparer< 'T > =
let inline NonStructural< 'T when 'T : (static member ( < ) : 'T * 'T -> bool) and 'T : (static member ( > ) : 'T * 'T -> bool) > : IComparer<'T> =
{ new IComparer<'T> with
member __.Compare(x,y) = NonStructuralComparison.compare x y }

Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/FSharp.Core/seq.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ namespace Microsoft.FSharp.Collections
LanguagePrimitives.DivideByInt< ^a> acc count

[<CompiledName("AverageBy")>]
let inline averageBy (projection : 'T -> ^U) (source: seq< 'T >) : ^U =
let inline averageBy (projection : 'T -> ^U) (source: seq<'T>) : ^U =
checkNonNull "source" source
use e = source.GetEnumerator()
let mutable acc = LanguagePrimitives.GenericZero< ^U>
Expand Down