test_negative.derror×4 hover×3all
/// Negative tests — these must ALL fail to compile.
/// Run: dmd -i -c test_negative.d
/// Expected: compilation errors for every call below.
import lib;
unable to read module `lib` Expected 'lib.d' or 'lib/package.d' in one of the following import paths:
unable to read module `lib` Expected 'lib.d' or 'lib/package.d' in one of the following import paths:
void
void D main()
main
()
{ // Positional function call — cannot pass `int` as `NamedOnly` auto
(local variable) _error_ r1
r1
= lib.inflateRect(10, 20, 100, 200, 5);
forward reference of import `lib`
// Positional struct init — cannot convert `int` to `NamedOnly` auto
(local variable) _error_ r2
r2
= lib.RectOpts(10, 20, 100, 200);
forward reference of import `lib`
}