Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to unittest package symbol outside of package #17827

Open
dlangBugzillaToGithub opened this issue Dec 27, 2017 · 0 comments
Open

Comments

@dlangBugzillaToGithub
Copy link

Jacob Carlborg (@jacob-carlborg) reported this on 2017-12-27T13:51:58Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=18131

Description

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant