import std;
class Test
{
float[3] _position = [0,0,0];
float[3] position()
{
writeln("Get");
return _position;
}
float[3] position(float[3] value)
{
writeln("Set");
return _position = value;
}
}
class STest : Test
{
float[3] position;
}
void main()
{
STest t = new STest;
t.position = [1,2,3];
}
It basically ignores the old method to just use the new variable.
If I try:
t.position([1,2,3]);
I get the error: onlineapp.d(26): Error: function expected before ()
, not t.position
of type float[3]
There's something really misleading