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

Fixed generic operator overload method generic arg inference from toType

This commit is contained in:
Brian Fiete 2022-01-21 12:01:50 -05:00
parent 0de32f7b34
commit dd2ecfb316
4 changed files with 38 additions and 18 deletions

View file

@ -336,6 +336,15 @@ namespace Tests
}
}
struct StructK : uint64
{
public static T operator implicit<T>(Self self)
where T : operator explicit uint64
{
return (.)(uint64)self;
}
}
/*struct OuterOp<T>
{
public struct InnerOp<T2>
@ -644,6 +653,10 @@ namespace Tests
Test.Assert(sji8i.mVal == 56);
Test.Assert(sji8e.mVal == 45);
}
StructK sk = (.)123;
uint64 sku32 = sk;
Test.Assert(sku32 == 123);
}
struct IntStruct