Code: Select all
class TestInv : Inventory
{
override bool TryPickup(in out Actor toucher)
{
let d = new('Derived');
d.test = "12345";
d.F1();
GoAwayAndDie();
return true;
}
}
class Base abstract
{
MyStruct s;
void F1()
{
s.Value1 = 1;
F2();
}
protected abstract void F2();
}
class Derived : Base
{
String test;
override void F2()
{
Console.Printf("Calling F2");
Console.Printf(test); // BOOM
}
}
struct MyStruct
{
int Value1;
MyInnerStruct Inner;
}
struct MyInnerStruct
{
int Value2;
}
Tested in GZDoom 4.7.0 and g4.8pre-4-g3ef60a40a.