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

           Summary: incomprehensible bug on windows with import side
                    effect
           Product: D
           Version: D2
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: thelastmamm...@gmail.com


--- Comment #0 from thelastmamm...@gmail.com 2012-10-19 11:24:45 PDT ---
Created an attachment (id=1150)
zip containing all 4 files to reproduce bug 

I've attached a set of 4 files I've simplified as much as I could. This gives
rise to a very weird bug (only on windows 32 bits). Here's the contents of the
readme:

steps to reproduce bug:
----
cd to directory containing this readme
rdmd --force -I.\tests main
----
note:
dmd -I.\tests main main_aux1 tests/main_testfun and then running main still has
the bug

note:
any of the following changes will remove the bug (ie the assert will pass):

rename tests/main_testfun to tests/main_aux2 (or probably other stuff) and
reflecting this in main_testfun.d and the import statement in main.d)
rename directory tests to test123 (or something else) and reflecting this in
the -I flag
remove the (useless) import main_aux1; in main_testfun.d
remove the (useless) import std.stdio in main_aux1.d
replace assert([0].map!(a=>b.length)[0]==1); by assert(b.length==1); in
main_testfun.d




├── main.d
├── main_aux1.d
├── readme.txt
└── tests
    └── main_testfun.d

--------------------
contents of each file:

cat main.d                                                                     

                              --------------------
import main_testfun;
void main(){
    testfun;
}
--------------------

cat main_aux1.d                                                                

                              --------------------
module main_aux1;
import std.stdio;//works wo this
--------------------

cat tests/main_testfun.d                                                       

                              --------------------
module main_testfun;
import main_aux1;
import std.algorithm:map;

void testfun(){
    auto b=[1];
    assert([0].map!(a=>b.length)[0]==1);
}
--------------------

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

Reply via email to