[Issue 7751] [ICE] From auto and forward reference
http://d.puremagic.com/issues/show_bug.cgi?id=7751 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||ice, pull Platform|x86 |All Version|unspecified |D2 OS/Version|Windows |All Severity|normal |major --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-23 23:06:10 PDT --- https://github.com/D-Programming-Language/dmd/pull/828 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7754] static this() in template is stripped during header gen
http://d.puremagic.com/issues/show_bug.cgi?id=7754 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-23 23:37:13 PDT --- https://github.com/D-Programming-Language/dmd/pull/829 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7611] static this() in template is not executed in .lib
http://d.puremagic.com/issues/show_bug.cgi?id=7611 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-23 23:52:46 PDT --- *** This issue has been marked as a duplicate of issue 7754 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7754] static this() in template is stripped during header gen
http://d.puremagic.com/issues/show_bug.cgi?id=7754 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added CC||sweatygar...@yahoo.co.jp --- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-03-23 23:52:46 PDT --- *** Issue 7611 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7722] Refuse normal functions to be used as properties
http://d.puremagic.com/issues/show_bug.cgi?id=7722 --- Comment #6 from Kenji Hara k.hara...@gmail.com 2012-03-24 00:24:18 PDT --- Reposted same pull: https://github.com/D-Programming-Language/dmd/pull/830 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7743] Parsing problem with nothrow delegate
http://d.puremagic.com/issues/show_bug.cgi?id=7743 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull Platform|x86 |All OS/Version|Windows |All --- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-03-24 00:43:53 PDT --- https://github.com/D-Programming-Language/dmd/pull/831 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7608] __traits(allMembers) is broken
http://d.puremagic.com/issues/show_bug.cgi?id=7608 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull, wrong-code --- Comment #3 from Kenji Hara k.hara...@gmail.com 2012-03-24 01:36:38 PDT --- https://github.com/D-Programming-Language/dmd/pull/832 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7731] Assertion failure: 't' on line 7911 in file 'mtype.c'
http://d.puremagic.com/issues/show_bug.cgi?id=7731 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||ice, pull Severity|normal |major --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-24 01:47:36 PDT --- https://github.com/D-Programming-Language/dmd/pull/833 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7759] Inconsistencies with Array Operations
http://d.puremagic.com/issues/show_bug.cgi?id=7759 --- Comment #2 from Daniel daniel...@bigpond.com 2012-03-24 02:13:16 PDT --- Its cases like this that are curious aswell. void main() { int[] a = [3,3,3]; int[2] y = a[] + a[]; // ok int[2] x = [3,3,3] + [3,3,3]; // error writeln(y); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7759] Inconsistencies with Array Operations
http://d.puremagic.com/issues/show_bug.cgi?id=7759 --- Comment #3 from Daniel daniel...@bigpond.com 2012-03-24 02:27:57 PDT --- If nothing else, the following must be a compiler bug, or otherwise a very unclear syntax; int[2] fnc(int[2] a, int[2] b) { return a[] + b[]; // Error: cannot implicitly convert expression (a[] + b[]) of type int[] to int[2LU] } int[2] fnc2(int[2] a, int[2] b) { int[2] x = a[] + b[]; return x; // ok } regards, Daniel :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7759] Inconsistencies with Array Operations
http://d.puremagic.com/issues/show_bug.cgi?id=7759 --- Comment #4 from Daniel daniel...@bigpond.com 2012-03-24 02:50:38 PDT --- Possible duplicate of things pointed out in #3066 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4953] Regression(2.031): templates don't do implicit conversion properly
http://d.puremagic.com/issues/show_bug.cgi?id=4953 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #12 from Kenji Hara k.hara...@gmail.com 2012-03-24 02:50:06 PDT --- https://github.com/D-Programming-Language/dmd/pull/45 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2367] Overloading error with string literals
http://d.puremagic.com/issues/show_bug.cgi?id=2367 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #12 from Kenji Hara k.hara...@gmail.com 2012-03-24 04:09:51 PDT --- https://github.com/D-Programming-Language/dmd/pull/834 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7755] regression(2.059head): ICE in glue.c
http://d.puremagic.com/issues/show_bug.cgi?id=7755 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-24 07:13:27 PDT --- https://github.com/D-Programming-Language/dmd/pull/835 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7760] New: Getting delegate address from class object requires unneeded cast
http://d.puremagic.com/issues/show_bug.cgi?id=7760 Summary: Getting delegate address from class object requires unneeded cast Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara k.hara...@gmail.com 2012-03-24 08:04:44 PDT --- Following code doesn't work. void main() { class C1 { string var = c1; alias var this; } auto c = new C1(); string delegate() dg = o.toString; // Error: e2ir: cannot cast c.var of type string to type object.Object } Workaround: Object o = c; string delegate() dg = o.toString; This is CastExp::semantic issue. In DelegateExp::semantic, c.toString is translated to (cast(Object)c).toString. Next in castExp::semantic, cast(Object)c is translated to cast(Object)(c.var), because class C1 has an alias this declaration. Of cause, this is bad cast, but semantic analysis doesn't check whether it is invalid cast or not. Then this expression is rejected and raise an error in glue layer. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7761] New: lambda expression doesn't parse attributes
http://d.puremagic.com/issues/show_bug.cgi?id=7761 Summary: lambda expression doesn't parse attributes Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: d...@dawgfoto.de --- Comment #0 from d...@dawgfoto.de 2012-03-24 08:53:55 PDT --- cat bug.d CODE enum dg = (int a) pure = 2 * a; CODE dmd -c bug http://dlang.org/expression.html#Lambda -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7761] lambda expression doesn't parse attributes
http://d.puremagic.com/issues/show_bug.cgi?id=7761 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull, rejects-valid --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-24 09:12:42 PDT --- https://github.com/D-Programming-Language/dmd/pull/831 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7762] New: Possible bug in std.algorithm.sort(ubyte[])
http://d.puremagic.com/issues/show_bug.cgi?id=7762 Summary: Possible bug in std.algorithm.sort(ubyte[]) Product: D Version: unspecified Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-03-24 09:39:41 PDT --- This program causes a segfault about 30-50% of the times it is run, on Windows 32 bit dmd 2.059head: Compile with: dmd -property -g -wi test.d import std.stdio, std.algorithm, std.random; void main() { immutable digits = 0123456789; enum nLoops = 5_000_000; enum maxLen = 20; char[maxLen] items; auto rnd = Xorshift(); rnd.seed(0); foreach (i; 0 .. nLoops) { immutable len = uniform(0, maxLen, rnd); foreach (j; 0 .. len) items[j] = digits[uniform(0, digits.length, rnd)]; string ns = items[0 .. len].idup; ns = cast(string)(cast(ubyte[])ns.dup).sort().release(); } } The stack trace: object.Error: Access Violation ...\dmd2\src\phobos\std\algorithm.d(7283): bool std.algorithm.__T8isSortedS593std10functional31__T9binaryFunVAyaa5_61203c2062Z9binaryFunTAhZ.isSorted(ubyte[]) ...\dmd2\src\phobos\std\algorithm.d(6744): D3std9algorithm60__T4sortVAyaa5_61203cÙ62VE€Ž«12SwapStrategy0TAhZ€…¹F€ƒ‰S€„«5range37€ƒÒ11S€ƒšedR€„’€ƒª€‘ÝZ€¢ ...\test.d(14): _Dmain The bug disappears if you remove .sort().release(). Maybe it doesn't crash wi ldc2 linux 64, dmd-front-end 2.058 (I don't know what compilation switches). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7664] Problem with fixed-sized associative array key assignment
http://d.puremagic.com/issues/show_bug.cgi?id=7664 --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-24 09:52:23 PDT --- Compiler can calculate the length for s[0 .. 4] in compile time, because both lower bound and upper bound are constant expressions. So converting it to static array type is possible. But, currently, the slice of an array expression is *always* typed as dynamic array type. Therefore it is a constant-folding enhancement, not a bug. Bug 7665 will also settle down to the same mechanism. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7664] Problem with fixed-sized associative array key assignment
http://d.puremagic.com/issues/show_bug.cgi?id=7664 bearophile_h...@eml.cc changed: What|Removed |Added Severity|normal |enhancement --- Comment #2 from bearophile_h...@eml.cc 2012-03-24 10:14:32 PDT --- (In reply to comment #1) Compiler can calculate the length for s[0 .. 4] in compile time, because both lower bound and upper bound are constant expressions. So converting it to static array type is possible. But, currently, the slice of an array expression is *always* typed as dynamic array type. Therefore it is a constant-folding enhancement, not a bug. Thank you for your answers. I convert this to enhancement request then. I think such constant-folding is useful to remove some run-time tests and speed up other code that uses slices. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7664] Problem with fixed-sized associative array key assignment
http://d.puremagic.com/issues/show_bug.cgi?id=7664 --- Comment #3 from Kenji Hara k.hara...@gmail.com 2012-03-24 10:26:02 PDT --- (In reply to comment #2) Thank you for your answers. I convert this to enhancement request then. I think such constant-folding is useful to remove some run-time tests and speed up other code that uses slices. In really special case, D allows such conversion from dynamic array type to static array type. See following: void foo(immutable(char)[4] s){} void main() { static assert(is(typeof(test) == immutable(char)[])); foo(test);// immutable(char)[] to immutable(char)[4] foo(['t','e','s','t']); // immutable(char)[] to immutable(char)[4] } So there seems to be enough reasoning for this enhancement. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7757] Inout function with lazy inout parameter doesn't compile
http://d.puremagic.com/issues/show_bug.cgi?id=7757 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-24 12:08:31 PDT --- https://github.com/D-Programming-Language/dmd/pull/836 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7694] Internal error: e2ir.c 1251 when calling member function inside struct via alias param
http://d.puremagic.com/issues/show_bug.cgi?id=7694 --- Comment #4 from Dmitry Olshansky dmitry.o...@gmail.com 2012-03-24 14:28:17 PDT --- I think the error is tolerable, when I found workaround I just rewrote it to global template. Less flexible maybe, but works for me. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7755] regression(2.059head): ICE in glue.c
http://d.puremagic.com/issues/show_bug.cgi?id=7755 --- Comment #2 from github-bugzi...@puremagic.com 2012-03-24 17:00:35 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/88448e2f720898a68e823e89f1b4212d78b1bf2b fix Issue 7755 - regression(2.059head): ICE in glue.c https://github.com/D-Programming-Language/dmd/commit/7aacfafb3efc4ec11dbe117242cd5de2df764095 Merge pull request #835 from 9rnsr/fix7755 Issue 7755 - regression(2.059head): ICE in glue.c -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7763] New: No template instantiation backtrace printed trying to use writefln on a const or immutable object reference
http://d.puremagic.com/issues/show_bug.cgi?id=7763 Summary: No template instantiation backtrace printed trying to use writefln on a const or immutable object reference Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: s...@iname.com --- Comment #0 from Stewart Gordon s...@iname.com 2012-03-24 17:52:11 PDT --- DMD 2.058, Win32 -- import std.stdio; class Set(Element) { void show(Element e) { writefln(%s, e); } } void main() { Set!(const(Object)) set2; } -- C:\Users\Stewart\Documents\Programming\D\Tests\bugsdmd hashset1.d d:\dmd2\windows\bin\..\..\src\phobos\std\format.d(1858): Error: template instance formatObject!(LockingTextWriter,const(Object),char) formatObject!(LockingTextWriter,const(Object),char) does not match template declaration formatObject(Writer,T,Char) if (hasToString!(T,Char)) -- main instantiates Set Set instantiates writefln writefln instantiates File.writefln File.writefln instantiates formatGeneric formatGeneric instantiates formatValue formatValue tries to instantiates formatObject but fails Despite this chain of template instantiations, no backtrace is printed. Consequently, it took me ages to find what in my code was triggering it in order to produce this reduced testcase. Fixing issue 1824 will invalidate this testcase, but won't fix the underyling compiler bug, which could potentially bite in other ways. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7764] New: Using phobos on windows through MinGW
http://d.puremagic.com/issues/show_bug.cgi?id=7764 Summary: Using phobos on windows through MinGW Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bioinfornat...@gmail.com --- Comment #0 from bioinfornatics bioinfornat...@gmail.com 2012-03-24 18:29:19 PDT --- dear when i build a project in a MinGW environnement (windows) dirSeparator equal \ instead / pathSeparator equal; instead : in general when you build in MinGW environnment you get back some unix usage -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7765] New: Cannot access __gshared function pointers from static methods
http://d.puremagic.com/issues/show_bug.cgi?id=7765 Summary: Cannot access __gshared function pointers from static methods Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-03-24 18:32:23 PDT --- class Foo { static int test() { return c_func(); } extern(C) __gshared int c_func(); } test.d(7): Error: need 'this' to access member c_func The docs say: __gshared may also be applied to member variables and local variables. In these cases, **__gshared is equivalent to static**, except that the variable is shared by all threads rather than being thread local. And true enough it works fine with regular variables: class Foo { static int getX() { return x; } extern(C) __gshared int x; } But not with function pointers, unless they're declared outside the class. I think this is a bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7755] regression(2.059head): ICE in glue.c
http://d.puremagic.com/issues/show_bug.cgi?id=7755 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7766] New: (Full Closures) Chain of nested functions fails
http://d.puremagic.com/issues/show_bug.cgi?id=7766 Summary: (Full Closures) Chain of nested functions fails Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Severity: minor Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: xi...@live.com --- Comment #0 from Xinok xi...@live.com 2012-03-24 19:43:02 PDT --- In the following code, you'd expect it to print 365. However, it prints a random number instead. The issue is that 'value' is referred to by 'foo', which is referred to by 'foo2'. DMD fails to detect this chain, so 'value' is allocated on the stack, not the heap. Once the function 'clbug' returns, 'value' is popped from the stack and so it ends up printing a random number. value - foo - foo2 void main(){ clbug()(); } int delegate() clbug(){ int value = 365; int foo(){ writeln(value); return value; } int foo2(){ return foo(); } return foo2; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7767] New: Unstable sort - slow performance cases
http://d.puremagic.com/issues/show_bug.cgi?id=7767 Summary: Unstable sort - slow performance cases Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: xi...@live.com --- Comment #0 from Xinok xi...@live.com 2012-03-24 20:00:28 PDT --- I've discovered a number of cases in which the unstable sort in std.algorithm performs very poorly. I'll provide the simplest example I have. import std.stdio, std.algorithm, std.range, std.datetime; void main(){ uint[] arr; arr.length = 1024 * 1024; foreach(i, ref v; arr) v = i; swapRanges(arr[0..$/2], arr[$/2..$]); StopWatch sw; sw.start(); sort(arr); sw.stop(); writeln(sw.peek.seconds, seconds); } This case takes 28 seconds on my PC. The problem can be solved by falling back to a heap sort or shell sort after so many recursions. Slow cases like these have possible security implications. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7731] Assertion failure: 't' on line 7911 in file 'mtype.c'
http://d.puremagic.com/issues/show_bug.cgi?id=7731 --- Comment #2 from github-bugzi...@puremagic.com 2012-03-24 21:17:50 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/daeed10cdda3bf21e697002944ed09e56cad76b3 Merge pull request #833 from 9rnsr/fix7731 Issue 7731 - Assertion failure: 't' on line 7911 in file 'mtype.c' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7743] Parsing problem with nothrow delegate
http://d.puremagic.com/issues/show_bug.cgi?id=7743 --- Comment #3 from github-bugzi...@puremagic.com 2012-03-24 22:27:49 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d2183ba7aab0d62b91ac230e8a532e9a14699c2f Merge pull request #831 from 9rnsr/fix7743 Issue 7743 - Parsing problem with nothrow delegate -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7731] Assertion failure: 't' on line 7911 in file 'mtype.c'
http://d.puremagic.com/issues/show_bug.cgi?id=7731 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---