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

           Summary: Dollar sign ($) fails in CTFE function
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: degener_tr...@mail.ru


--- Comment #0 from Shire <degener_tr...@mail.ru> 2012-07-23 02:55:29 PDT ---
DMD v2.059

pure string foo(string s)() {
  uint fromPos = 2;
  // return s[fromPos..$]; // fails on CTFE with
  // Assertion failure: '!v->isDataseg() || v->isCTFE()' on line 108 in file
'interpret.c'
  return s[fromPos..s.length]; // OK
  // return s[2..$]; // Also OK
}

int main(string[] args)
{
  // pragma(msg, foo!"12345"()); // fails
  string s = foo!"12345"(); // OK in all cases
  return 0;
}

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

Reply via email to