You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the following F# Script that uses Spectre.Console, similar code from the C# examples cannot be compiled without a lot of gymnastics:
#r "nuget: Spectre.Console"openSpectre.Console// explicit usage of the extension method workslett= HasTableBorderExtensions.Border(Table(), TableBorder.Square)// expected usage of the extension method fails to compile - the compiler picks the Property on the type instead, which isn't a method// Table.Border: TableBorder with get, setlett' = Table().Border(TableBorder.Square)
Expected behavior
The compiler chooses the extension method that is in scope from the library.
Actual behavior
The compiler gives FS0003 (This value is not a function and cannot be applied) because it's expecting a property rather than a method.
Known workarounds
See the usage directly above, but the extension method that is in scope can be used directly. This is far less than ideal because a) the entire library is built around this sort of wrapping-builder pattern, and b) Spectre.Console is a very high-profile library in .NET in the space of command-line tooling.
Related information
This is on F# 6 on the 6.0.200 SDK.
The text was updated successfully, but these errors were encountered:
Repro steps
Given the following F# Script that uses Spectre.Console, similar code from the C# examples cannot be compiled without a lot of gymnastics:
Expected behavior
The compiler chooses the extension method that is in scope from the library.
Actual behavior
The compiler gives FS0003 (This value is not a function and cannot be applied) because it's expecting a property rather than a method.
Known workarounds
See the usage directly above, but the extension method that is in scope can be used directly. This is far less than ideal because a) the entire library is built around this sort of wrapping-builder pattern, and b) Spectre.Console is a very high-profile library in .NET in the space of command-line tooling.
Related information
This is on F# 6 on the 6.0.200 SDK.
The text was updated successfully, but these errors were encountered: