digitalmars.D.bugs - [Issue 9923] New: [ICE] (interpret.c line 167) with countUntil on Typedef[]
- d-bugmail puremagic.com (38/38) Apr 11 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9923
- d-bugmail puremagic.com (14/14) Jun 12 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9923
- d-bugmail puremagic.com (7/8) Jun 13 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9923
- d-bugmail puremagic.com (23/28) Jun 17 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9923
- d-bugmail puremagic.com (18/35) Jun 17 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9923
http://d.puremagic.com/issues/show_bug.cgi?id=9923 Summary: [ICE] (interpret.c line 167) with countUntil on Typedef[] Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc import std.algorithm: countUntil; import std.typecons: Typedef; alias Foo = Typedef!(const string); immutable Foo[] bar = ["a", "b"]; void main() { Foo a; countUntil(bar, a); } DMD 2.063alpha gives: Assertion failure: 'v->ctfeAdrOnStack >= 0 && v->ctfeAdrOnStack < stackPointer()' on line 167 in file 'interpret.c' Removing the const the compiler doesn't crash: import std.algorithm: countUntil; import std.typecons: Typedef; alias Foo = Typedef!(string); immutable Foo[] bar = ["a", "b"]; void main() { Foo a; countUntil(bar, a); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 11 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9923 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED With latest HEAD, now gives std/typecons.d(3886): Error: cannot modify const expression Typedef_payload walter.d(4): Error: CTFE failed because of previous errors in this There's a bug in Phobos. That type of bug no longer triggers a crash in CTFE. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 12 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9923There's a bug in Phobos. That type of bug no longer triggers a crash in CTFE.Do you suggest me to open some kind of Phobos bug report? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 13 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9923 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich gmail.com 16:56:46 PDT ---It looks to me like a compiler bug: ----- struct Typedef(T, T init, string cookie=null) { private T Typedef_payload = init; this(T init) { Typedef_payload = init; // should be allowed AFAIK } mixin Proxy!Typedef_payload; } ----- Try filing it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------There's a bug in Phobos. That type of bug no longer triggers a crash in CTFE.Do you suggest me to open some kind of Phobos bug report?
Jun 17 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9923It looks to me like a compiler bug: ----- struct Typedef(T, T init, string cookie=null) { private T Typedef_payload = init; this(T init) { Typedef_payload = init; // should be allowed AFAIK } mixin Proxy!Typedef_payload; } ----- Try filing it.This code is working: import std.typecons: Proxy; struct Foo(T, T init, string cookie=null) { private T bar = init; this(T init) { bar = init; } mixin Proxy!bar; } void main() { auto f = Foo!(int, 0, "abc")(10); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 17 2013