Bug 9081 – Modules shouldn't have a type

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-26T06:34:00Z
Last change time
2015-06-09T05:10:40Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2012-11-26T06:34:41Z
Currently packages and modules have type 'void', which makes no sense. They should have type _error. The following code should compile. --- import std.stdio; static assert( !is(typeof(std)) ); ---
Comment #1 by maxim — 2012-11-26T10:50:32Z
Raw templates also have void type which may be a source of confusion. I think dmd should introduce special types for modules and templates or not define a type for them at all.
Comment #2 by yebblies — 2013-11-23T08:22:02Z
Comment #3 by github-bugzilla — 2013-11-26T04:58:07Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/cb3bb8d8171a24597b9b97b3b874442a1b84d797 Fix Issue 9081 - Modules shouldn't have a type https://github.com/D-Programming-Language/dmd/commit/5f033bfd9f7aaf95dade128f50bfc7360bb16215 Merge pull request #2866 from yebblies/issue9081 Issue 9081 - Modules shouldn't have a type