[Issue 6833] New: Double literals outputted without comma in headers
http://d.puremagic.com/issues/show_bug.cgi?id=6833 Summary: Double literals outputted without comma in headers Product: D Version: D2 Platform: Other 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 2011-10-20 02:52:10 PDT --- --- bug.d --- module bug; auto a = 3 / 2.0; --- dmd -c -H bug.d Resulting header: --- bug.di --- module bug; auto a = 3 / 2; --- When creating an import header, floating point literals are written without their fractional part if it is '.0'. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6177] Regression(2.053): Insert in associative array: Internal error: backend/cgcs.c 162
http://d.puremagic.com/issues/show_bug.cgi?id=6177 Richard Webb we...@beardmouse.org.uk changed: What|Removed |Added CC||we...@beardmouse.org.uk --- Comment #8 from Richard Webb we...@beardmouse.org.uk 2011-10-20 08:15:12 PDT --- I'm getting this when trying to compile the Juno library with the latest DMD source. The crash there seems to reduce to: struct foo { ~this() { } } void bar(foo[] args...) { } void main() { bar(); } It's ok if i compile it with -O. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5354] formatValue: range templates introduce 3 bugs related to class struct cases
http://d.puremagic.com/issues/show_bug.cgi?id=5354 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch --- Comment #18 from Kenji Hara k.hara...@gmail.com 2011-10-20 10:10:38 PDT --- We can check the toString method is overridden like follows: string delegate() dg = obj.toString; auto overridden = dg.funcptr != Object.toString; https://github.com/D-Programming-Language/phobos/pull/298 For class range objects, if the toString method is actually overridden, use it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6834] New: std.stdio conflicts with core.stdc.stdio
http://d.puremagic.com/issues/show_bug.cgi?id=6834 Summary: std.stdio conflicts with core.stdc.stdio Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: jlqu...@optonline.net --- Comment #0 from Jerry Quinn jlqu...@optonline.net 2011-10-20 11:00:13 PDT --- import std.stdio; import std.c.stdio; void foo() { File f = stdin; int c = getc(f.getFP()); } ~/dmd2/linux/bin64/dmd stdiobug.d stdiobug.d(5): Error: std.stdio.stdin at /home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/stdio.d(2191) conflicts with core.stdc.stdio.stdin at /home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/stdio.di(262) My thought is that the names for stdin should be different. Otherwise it makes it harder to use both stdio and c library features together. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6018] Multiple includes of std.parallelism causes DMD to segfault.
http://d.puremagic.com/issues/show_bug.cgi?id=6018 Jonathan Crapuchettes jcrapuchet...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6835] New: Code pattern: uniq on an array
http://d.puremagic.com/issues/show_bug.cgi?id=6835 Summary: Code pattern: uniq on an array Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2011-10-20 18:32:34 PDT --- Given an unsorted array, remove the duplicate items is a common need. In std.algorithm there are tools to perform this task with a very limited amount of code: import std.algorithm; void main() { auto items = [3, 1, 5, 2, 3, 1]; items.length -= copy(uniq(items.sort()), items).length; assert(items == [1, 2, 3, 5]); } (If you see better solutions feel free to add a comment.) It's a single line of code, but in my opinion it's not obvious code, and it repeats the name items three times (this makes it a bit bug prone). Removing the duplicated items from an unsorted array is a common operation, so maybe it's worth adding this pattern as a function, named like std.array.sortedUnique or something similar. (Other ways to create an array of unique items is to use hashing, but this is better left to other functions.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6365] AutoTupleDeclaration
http://d.puremagic.com/issues/show_bug.cgi?id=6365 --- Comment #36 from Kenji Hara k.hara...@gmail.com 2011-10-20 19:08:36 PDT --- Scala has similar syntax. http://www.scala-lang.org/docu/files/ScalaReference.pdf p.170 | Changes in Version 2.6.1 (30-Nov-2007) | Mutable variables introduced by pattern binding | Mutable variables can now be introduced by a pattern matching definition (§4.2), | just like values can. Examples: | var (x, y) = if (positive) (1, 2) else (-1, -3) | var hd :: tl = mylist -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6365] AutoTupleDeclaration
http://d.puremagic.com/issues/show_bug.cgi?id=6365 --- Comment #37 from Kenji Hara k.hara...@gmail.com 2011-10-20 19:20:06 PDT --- (In reply to comment #34) We should really strive to get a consistent syntax for this. auto (x, y) is a totally specialized syntax. See comment #19. It is a special case of (auto x, auto y), and it is useful if you want to apply non-auto storage classes. e.g. const (x, y) - (const x, const y) const (int n, string s) - (const int n, const string s) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6813] Yet another cannot get frame pointer error
http://d.puremagic.com/issues/show_bug.cgi?id=6813 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #2 from Walter Bright bugzi...@digitalmars.com 2011-10-20 19:51:45 PDT --- What a fantastically convoluted example :-( -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6813] Yet another cannot get frame pointer error
http://d.puremagic.com/issues/show_bug.cgi?id=6813 --- Comment #3 from Walter Bright bugzi...@digitalmars.com 2011-10-20 20:21:45 PDT --- It shrinks down to this. Compile with -inline: struct Foo(T) { Foo opSlice(size_t a, size_t b) { return Foo(_indices[a..b]); } T _indices; } struct SortedRange(alias pred) { SortedRange opSlice(size_t a, size_t b) { return SortedRange(); } } void main() { auto ind = SortedRange!({ })(); auto a = Foo!(typeof(ind))(); } It happens on Windows, too, and is not a backend bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6836] New: map + UFCS = fail
http://d.puremagic.com/issues/show_bug.cgi?id=6836 Summary: map + UFCS = fail Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: cbkbbej...@mailinator.com --- Comment #0 from Nick Sabalausky cbkbbej...@mailinator.com 2011-10-20 22:41:42 PDT --- Fails to compile: import std.algorithm; void main() { [1].map!a(); } I tested on 2.050 - 2.055 and it fails on all of them. I haven't gone any further back. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---