Bug 10844 – Importing package as module fails with nested packages
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-08-18T04:55:00Z
Last change time
2013-08-19T02:51:49Z
Assigned to
nobody
Creator
szadows
Comments
Comment #0 by szadows — 2013-08-18T04:55:11Z
This code fails:
p1/p2/p3/m1.d:
module p1.p2.p3.m1;
p1/p2/p3/package.d
module p1.p2.p3;
public import p1.p2.p3.m1;
main.d:
import p1.p2.p3;
void main() {}
Compile command:
dmd main.d p1\p2\p3\m1.d
Error message:
main.d(1): Error: can only import from a module, not from package p1.p3
main.d(1): Error: module p3 is in file 'p1\p2\p3.d' which cannot be read
Comment #1 by andrej.mitrovich — 2013-08-18T17:35:13Z
Which OS + compiler version (and commit if git-head) are you using? I can't recreate this with a5c9b9ae4c25aea71153f162ed7026f561061e28 on win32.
Comment #2 by szadows — 2013-08-19T01:56:46Z
(In reply to comment #1)
> Which OS + compiler version (and commit if git-head) are you using? I can't
> recreate this with a5c9b9ae4c25aea71153f162ed7026f561061e28 on win32.
I'm using DMD 2.063.2 on win32.
Comment #3 by andrej.mitrovich — 2013-08-19T02:51:49Z
(In reply to comment #2)
> (In reply to comment #1)
> > Which OS + compiler version (and commit if git-head) are you using? I can't
> > recreate this with a5c9b9ae4c25aea71153f162ed7026f561061e28 on win32.
>
> I'm using DMD 2.063.2 on win32.
Package modules were introduced in git-head, not in 2.063. You'll either have to use git-head or wait for the 2.064 release.