On Monday, 7 November 2016 at 08:34:55 UTC, Andrea Fontana wrote:

--- test.d
void* test (ssize_t );
import core.sys.posix.unistd;
---

Try to run:
dmd test.d

It says:
/usr/include/dmd/druntime/import/core/sys/posix/sys/types.d(100): Error: 
undefined identifier 'c_long'

It looks normal but it's not documented. It's just that the import is not yet known in the scope. It 's like:

void main(string[] args)
{
    writeln();
    import std.stdio;
}

But

void main(string[] args)
{
    writeln();
}
import std.stdio;

works because the symbol lookup succeeds in the parent scope.

For your example to work, another semantic pass would necessary.

Reply via email to