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

           Summary: Regression(2.059head) ICE(tocsym.c) using
                    scope(failure) within foreach-range
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: kekeni...@yahoo.co.jp


--- Comment #0 from kekeni...@yahoo.co.jp 2012-04-03 01:34:56 PDT ---
Building the following code with DMD 2.059head fails in ICE.
MESSAGE: Assertion failure: '0' on line 277 in file 'tocsym.c'

DMD2.058 works.

------------------------------------
struct File {
  ~this(){}
}

struct ByLine
{
  File file;

  // foreach interface
  @property bool empty() const
    { return true; }
  @property char[] front()
    { return null; }
  void popFront(){}
}

void main()
{
  int dummy;
  ByLine f;
  foreach (l; f) {
    scope(failure) // 'failure' or 'success' fails, but 'exit' works
      dummy = -1;
    dummy = 0;
  }
}

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

Reply via email to