D-Programming-Language/dmd — pull request #2152 by 9rnsr (2013-06-09 14:39:06+00:00)
Title: Issue 10302 - Package module conflicts with package name

http://d.puremagic.com/issues/show_bug.cgi?id=10302

...and small fix up for #2139.

If the source tree is as follows:
```
pkg/
+ package.d
+ common.d
```

A package module will be incorporated to the internal package tree in two ways: `import pkg;` and `import pkg.common;`.

Current code considers either only one of them will occur. If both case occurs at the same time, like as `import pkg; import pkg.common;`, pkg as a `Module` and pkg as a `Package` will conflict each other.

To solve the problem, I added two fields `isPkgMod` and `mod` in `Package` class.