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

Improved virtual overrides in extensions

This commit is contained in:
Brian Fiete 2022-05-07 11:40:55 -07:00
parent 8a84647bcd
commit e1d7939081
11 changed files with 116 additions and 11 deletions

View file

@ -57,6 +57,14 @@ extension LibClassA
namespace LibA
{
extension LibA0
{
public new override int GetA()
{
return 3;
}
}
extension LibA3
{
this
@ -386,6 +394,10 @@ namespace Tests
delete ca;
Test.Assert(LibClassA.sMagic == 7771);
LibA.LibA0 la0 = scope .();
int la0a = la0.GetA();
Test.Assert(la0a == 3);
LibA.LibA3 la3 = scope .();
Test.Assert(la3.mA == 114);
Test.Assert(la3.mB == 7);