Code: Select all
class BaseClass abstract
{
abstract void F1(out int ticker);
abstract void F2(out int ticker);
}
class DerivedClass : BaseClass
{
override void F1(out int ticker)
{
Console.Printf("F1: %i", ticker);
}
override void F2(int ticker)
{
Console.Printf("F2: %i", ticker);
}
}
class OutParamTest : Actor
{
override void BeginPlay()
{
Super.BeginPlay();
cls = new('DerivedClass');
}
override void Tick()
{
cls.F1(Ticker);
cls.F2(Ticker);
Ticker++;
Super.Tick();
}
int Ticker;
BaseClass cls;
}
I had this happen in some code elsewhere and had to spend some good 20 minutes to figure out where the problem was exactly. Shouldn't this be a warning at the very least? This also sounds like a possible security concern.