mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-29 04:55:58 +02:00
Changed ResolveSelfType to not require a type instance
This commit is contained in:
parent
1bacf5eee2
commit
717d6aa4cf
6 changed files with 71 additions and 61 deletions
|
@ -389,6 +389,22 @@ namespace Tests
|
|||
}
|
||||
}
|
||||
|
||||
class Test5
|
||||
{
|
||||
public Result<T> TryGetValue<T>() where T : IParseable
|
||||
{
|
||||
T val = default;
|
||||
var s = T.Serialize(val);
|
||||
return T.Deserialize(s);
|
||||
}
|
||||
}
|
||||
|
||||
interface IParseable
|
||||
{
|
||||
public static Result<Self> Deserialize(StringView value);
|
||||
public static String Serialize(Self value);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public static void TestDefaults()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue