-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
C#-style extension method support:
public static class MyExtensions
{
public static void MyExtensionMethod(this string str) { }
}Can only be consumed explicitly at the moment:
main(): () =
let str = "a string"
MyExtensions.MyExtensionMethod(str)We should add support that would look like this:
main(): () =
let str = "a string"
str.MyExtensionMethod()Also, we need to consider adding support for C#14-style extension members:
public static class MyExtensions
{
extension(string str)
{
// Method
public void MyExtensionMethod() { }
// Property
string PlusOne => $"{str}1";
}
}Note: It's likely that once we handle C#-style extension methods, that C#14-style extension members will fit naturally.
Metadata
Metadata
Assignees
Labels
Projects
Status
No status