Skip to content
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
5 changes: 5 additions & 0 deletions docs/articles/nunit/release-notes/framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,11 @@ This release includes a series of enhancements and bug fixes. Notably, some of t

Be aware that this might cause compile errors in cases where the code was previously ignored. These errors can be safely resolved by removing the affected code.

**F# users:** the new `Is.EqualTo` overloads can cause the F# compiler to report *A unique overload for method 'EqualTo' could not be determined*
when the expected value is a list or other collection. Specify the type argument, for example `Is.EqualTo<int list>([2; 3])`,
to resolve the ambiguity. See [4920](https://github.com/nunit/nunit/issues/4920) and the
[Equal Constraint](xref:constraint-equal) notes.

There are 29 issues fixed in this release.

### Enhancements
Expand Down
12 changes: 12 additions & 0 deletions docs/articles/nunit/writing-tests/constraints/EqualConstraint.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,18 @@ But was: "89031"
null, the Constraint succeeds. If only one is null, it fails.
8. NUnit has special semantics for comparing **Streams** and **DirectoryInfos**. For a **Stream**, the contents are
compared. For a **DirectoryInfo**, the first-level directory contents are compared.
9. **F# callers:** since NUnit 4.3.0, `Is.EqualTo` has overloads taking `object`, `T` and `IEnumerable<T>`. C# picks the
right one, but the F# compiler cannot choose between them when the expected value is a list or other collection and
reports _A unique overload for method 'EqualTo' could not be determined_. Specify the type argument on the call to
resolve the ambiguity:

```fsharp
Assert.That([2; 3], Is.EqualTo<int list>([2; 3]))
```

This is a known limitation of F# overload resolution
([dotnet/fsharp#1647](https://github.com/dotnet/fsharp/issues/1647)); see NUnit issue
[4920](https://github.com/nunit/nunit/issues/4920) for the discussion.
## See also

Expand Down
Loading