https://issues.dlang.org/show_bug.cgi?id=18131
Issue ID: 18131
Summary: Not possible to unittest package symbol outside of
package
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
If a symbol is declared with "package" it's not possible to access it inside a
unittest block if the module is not inside a package. Example:
$ cat foo.d
package void bar() {}
unittest
{
bar();
}
$ dmd -unittest foo.d
foo.d(5): Error: function foo.bar is not accessible from module foo
--