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

Fixed wrappable props and fixed fixed generic binding in MemberRefExpr

This commit is contained in:
Brian Fiete 2025-02-15 17:53:13 -08:00
parent 4cd8fe7742
commit b1181a936d
2 changed files with 80 additions and 1 deletions

View file

@ -432,6 +432,29 @@ namespace Tests
T sum = a + b;
}
interface IIntVal
{
int IntVal { get; }
}
struct StructC : IIntVal
{
int IIntVal.IntVal
{
get
{
return 123;
}
}
}
static int GetIntVals<T>(T val) where T : IIntVal
{
int a = (val).[Friend]IntVal;
int b = val.IntVal;
return a + b;
}
[Test]
public static void TestDefaults()
{
@ -473,6 +496,7 @@ namespace Tests
Test.Assert(TestIFaceD2(cg) == 999);
ClassH ch = scope .();
Test.Assert(GetIntVals(StructC()) == 246);
}
}
}