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

           Summary: Internal error: ../ztc/cgcs.c 354
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: maxim...@gmail.com


--- Comment #0 from Maksim Zholudev <maxim...@gmail.com> 2012-04-06 01:26:26 
PDT ---
Code:

----------
import std.stdio;

void main()
{
    with(File("Vocabulary-4.txt", "rt"))
        foreach(s; byLine) writeln(s);        
}
----------

DMD64 D Compiler v2.058 on 64-bit Linux output:
----------
Internal error: ../ztc/cgcs.c 354
----------

=== Additional information ===

The same error for:
----------
...
auto f = File("Vocabulary-4.txt", "rt");
with(f)
    foreach(s; byLine) writeln(s);
...
----------

No error for:
----------
...
auto f = File("Vocabulary-4.txt", "rt");
foreach(s; f.byLine) writeln(s);
...
----------

On the following code it works well:
----------
import std.stdio;

void main()
{
    struct Foo {string s;}

    with(Foo("fffuuu"))
        foreach(c; s)
            writeln(c);
}
----------

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

Reply via email to