www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10598] New: Using not-imported type - AssertFail: 'global.errors' line 6040 'template.c'

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10598

           Summary: Using not-imported type - AssertFail: 'global.errors'
                    line 6040 'template.c'
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: qaston gmail.com



To trigger the assert we need 2 modules:

module a.notimported;

struct LocalType {
}

module a.app;
import std.typetuple;

alias TypeTuple!(__traits(getMember, a.notimported,(__traits(allMembers,
a.notimported)[1])))[0] notImportedType;

Modules have to create a hierarchy like this, at least it appears this way.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 10 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10598




I couldn't reproduce the issue with git head in Windows.

Could you provide us more information?
1. the used dmd version
2. two module file names, file location and directory structure
3. invoke command line and current directory
4. platform

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 10 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10598




dmd version: 2.063.2
platform: win8 64 bit
command line invoked from a\: dmd a/app.d a/notimported.d 
dir structure:

a\
    a\notimported.d
    a\app.d

The bug here appears to be that i'm able to use a.notimported in app.d without
importing it. In setup without "a" package I simply gen an error about unknown
symbol "notimported".
.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 10 2013