namespace A
{
class X
{
X() { print("X()"); }
}
}
void X()
{
auto test = A::X();
}
void main()
{
X();
}
When preparing and executing the above, we output the following.
>asrun.exe script2.as
script2.as (10, 1) : INFO : Compiling void X()
script2.as (12, 8) : ERR : Data type can't be 'void'
script2.as (0, 0) : ERR : Script failed to build
auto test = A::X();
The reason for doing this is because it really is `class@ X`. Also, if executed from another namespace as follows, it will be executed normally.
namespace A
{
class X
{
X() { print("X()"); }
}
}
namespace B
{
void X()
{
auto test = A::X();
}
}