Does the 'package' protection attribute not work?

Stijn Herreman stijn.herreman at telenet.be
Sun Aug 7 09:58:53 PDT 2011


module main;

import std.stdio;
import my_module;

int main()
{
	my_method();
	return 0;
}


module my_module;

import std.stdio;

package void my_method()
{
	 writeln("Hello D-World!");
}


Error: function my_module.my_method is not accessible from main


More information about the Digitalmars-d mailing list