1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-16 15:24:10 +02:00

Fixes for type initializer blocks

This commit is contained in:
Brian Fiete 2020-12-07 10:58:02 -08:00
parent 9cd47a784b
commit 34dcd47dd5
6 changed files with 98 additions and 11 deletions

View file

@ -1,9 +1,23 @@
using System;
namespace Tests
{
class Objects
{
class ClassA
{
public int mA = 1;
this
{
mA *= 11;
}
public this()
{
mA += 100;
}
public virtual void MethodA()
{
@ -17,5 +31,12 @@ namespace Tests
base.MethodA();
}
}
[Test]
public static void TestBasics()
{
ClassA ca = scope .();
Test.Assert(ca.mA == 111);
}
}
}