https://issues.dlang.org/show_bug.cgi?id=15395
Issue ID: 15395
Summary: unittest can't access symbol of visibility package
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
For following coding there is an error during compilation:
module utils;
package string toBulkString(string s)
{
import std.string: format;
return "$%s\r\n%s\r\n".format(s.length, s);
}
unittest
{
string actual = "foobar".toBulkString();
//...
}
>> source\utils.d(11,39): Error: function utils.toBulkString is not accessible
>> from module utils
The error disappears if I change the visibility attribute from package to
private.
--