-
Notifications
You must be signed in to change notification settings - Fork 854
Open
Labels
AI-thinks-issue-fixedArea-Compiler-ImportAndInteropimport of .NET DLLs and interopimport of .NET DLLs and interopBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone
Description
Please provide a succinct description of the issue.
Repro steps
Provide the steps required to reproduce the problem:
- Load a C# library that defines a method that takes a default value
- From F# call the method without specifying the value3.
Expected behavior
Expects that the following snippet compiles:
#r "nuget: FluentAssertions.Json, 6.1.0"
open FluentAssertions.Json
open Newtonsoft.Json.Linq
let assertJsonEqual expected actual =
let expectedToken = JToken.Parse expected
let actualToken = JToken.Parse actual
actualToken.Should().BeEquivalentTo(expectedToken) |> ignoreActual behavior
The member or object constructor 'BeEquivalentTo' does not take 1 argument(s). An overload was found taking 3 arguments.F# Compiler505
Known workarounds
A workaround is to specify the default values explicitly:
#r "nuget: FluentAssertions.Json, 6.1.0"
open FluentAssertions.Json
open Newtonsoft.Json.Linq
let assertJsonEqual expected actual =
let expectedToken = JToken.Parse expected
let actualToken = JToken.Parse actual
actualToken.Should().BeEquivalentTo(expected = expectedToken, because = "") |> ignoreRelated information
Provide any related information (optional):
- Operating systems: Windows 11, macOS Monterey 12.4
- .NET Runtime kinds: .NET Core 6.0.300 , 3.1.421
- Editing Tools: Rider 2022.1.2, Visual Studio Community 2022 for Mac Preview (17.3 build 198), Visual Studio Code and Ionide
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
AI-thinks-issue-fixedArea-Compiler-ImportAndInteropimport of .NET DLLs and interopimport of .NET DLLs and interopBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.
Type
Projects
Status
New