niv / neverwinter.nim

CLI tools and nim library used in Neverwinter Nights: Enhanced Edition development
MIT License
133 stars 29 forks source link

nwn_script_comp: Mismatched data type between function declaration and implementation is not properly detected #114

Open LaputianBird opened 7 months ago

LaputianBird commented 7 months ago

While the case of

void some_function();

int some_function()
{
    return 10;
}

void main()
{
    PrintInteger(
        some_function()
    );
}

is properly detected with a mismatched parameters error message, the case of

void some_function();

int some_function()
{
    return 10;
}

void main()
{
    some_function();
}

is apparently compiled without errors with the stand-alone cli compiler, but fails with a STACK UNDERFLOW error from the in-game script chunk console