Private visible?
Jari-Matti Mäkelä
jmjmak at utu.fi.invalid
Thu Jul 13 13:14:00 PDT 2006
Dave wrote:
> Here's an example that doesn't require FQN to expose the bug:
>
> module foo;
> void bar(int i)
> {
> printf("bar(int)\n");
> }
> private void bar(char[] str)
> {
> printf("bar(char[]): %s\n",cast(char*)str);
> }
>
> module main;
> import foo;
> void main()
> {
> bar("test");
> }
>
> If you comment bar(int) out then it issues the correct compiler message
> otherwise it happily prints what you'd expect if bar(char[]) was not
> private.
Doh, didn't see that :">
--
Jari-Matti
More information about the Digitalmars-d
mailing list