DMD 1.037 and 2.020 releases
Derek Parnell
derek at psych.ward
Tue Nov 25 18:23:52 PST 2008
On Tue, 25 Nov 2008 14:22:47 -0800, Walter Bright wrote:
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.037.zip
>
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.021.zip
An update to the Bugzilla 313 issue...
It appears that it is fixed only with respect to accessing routines but not
fixed when accessing variables.
// --- file: foo/sub.d
module foo.sub;
private
{
int iPrivate = 12;
int rPrivate() { return 12; }
}
public
{
int iPublic = 13;
int rPublic() { return 13; }
}
package
{
int iPackage = 14;
int rPackage() { return 14; }
}
//------------------------------//
// --- file: test.d
module test;
import foo.sub;
void main()
{
int i;
int j;
int k;
i = foo.sub.iPrivate;
j = foo.sub.iPublic;
k = foo.sub.iPackage;
i = foo.sub.rPrivate();
j = foo.sub.rPublic();
k = foo.sub.rPackage();
}
//------------------------------//
// --- file: test1.d
module test;
import foo.sub;
void main()
{
int i;
int j;
int k;
i = iPrivate;
j = iPublic;
k = iPackage;
i = rPrivate();
j = rPublic();
k = rPackage();
}
//------------------------------//
C:\temp>dmd test foo/sub
test.d(13): Error: function sub.rPrivate is not accessible from test
test.d(15): Error: function sub.rPackage is not accessible from test
C:\temp>dmd test1 foo/sub
test1.d: module test foo.sub.iPrivate is private
test1.d: module test foo.sub.rPrivate is private
test1.d(13): Error: function sub.rPrivate is not accessible from test
test1.d(15): Error: function sub.rPackage is not accessible from test
C:\temp>dmd
Digital Mars D Compiler v1.037
Copyright (c) 1999-2008 by Digital Mars written by Walter Bright
Documentation: http://www.digitalmars.com/d/1.0/index.html
In my opinion, both test.d and test1.d should be issuing the same error
messages, and the messages from test1.d (without full name qualifications)
seem to be correct.
--
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
More information about the Digitalmars-d-announce
mailing list