1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-23 10:08:00 +02:00

Support interface binding with complex 'Self' returns ie: Result<Self>

This commit is contained in:
Brian Fiete 2022-01-08 09:28:48 -05:00
parent b47f230345
commit dc6f940561
3 changed files with 26 additions and 2 deletions

View file

@ -315,6 +315,19 @@ namespace Tests
return val.Val;
}
interface IParsable
{
static Result<Self> Parse(StringView sv, Self defaultVal);
}
class ClassH : IParsable
{
public static Result<Self> Parse(StringView sv, ClassH defaultVal)
{
return .Err;
}
}
[Test]
public static void TestDefaults()
{