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:
parent
8a84647bcd
commit
e1d7939081
11 changed files with 116 additions and 11 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue