[Issue 8779] New: std.zlib.UnCompress needs a way to detect end-of-stream

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8779

   Summary: std.zlib.UnCompress needs a way to detect
end-of-stream
   Product: D
   Version: unspecified
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: slud...@outerproduct.org


--- Comment #0 from S�nke Ludwig slud...@outerproduct.org 2012-10-08 02:24:53 
PDT ---
The return value of the inflate() call is currently not distinguished between
Z_OK and Z_STREAM_END. However, this information is necessary if the size of
the inflated stream is unknown. UnCompress either needs to return a status with
each uncompress() call, or, probably better, get an empty() property that is
set accordingly.

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


[Issue 8780] New: std.traits.ReturnType of overloaded functions

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8780

   Summary: std.traits.ReturnType of overloaded functions
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: luka8...@owave.net


--- Comment #0 from luka8088 luka8...@owave.net 2012-10-08 03:29:06 PDT ---
module program;

import std.stdio;
import std.traits;

int f1 () { return 1; }
string f1 () { return 2; }

void main () {

  ReturnType!(f1) v1;

  writeln(typeid(typeof(v1))); // int
   // chould this lead to unexpected behavior ?

}

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


[Issue 8780] std.traits.ReturnType of overloaded functions

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8780



--- Comment #1 from luka8088 luka8...@owave.net 2012-10-08 03:44:04 PDT ---
module program;

import std.stdio;
import std.traits;

class a {}
class b {}

int f1 (a o) { return 1; }
string f1 (b o) { return 2; }

void main () {
  a a1 = new a();
  b b1 = new b();

  writeln(a1.f1()); // 1
  writeln(b1.f1()); // 2

  typeof(a1.f1()) v1; // int
  typeof(b1.f1()) v2; // string

  ReturnType!(a1.f1) v2; // Error: no property 'f1' for type 'program.a'
 // Error: ReturnType!(__error) is used as a type

}

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


[Issue 8780] std.traits.ReturnType of overloaded functions

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8780



--- Comment #2 from luka8088 luka8...@owave.net 2012-10-08 04:04:34 PDT ---
I am sorry for such bad description but it seems to me that there are multiple
bugs here and I am not sure where the problem is - or even if there is one.
Free free to provide a better description =)

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


[Issue 8782] D lexer do not understand unicode char … for variadic

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8782



--- Comment #1 from bioinfornatics bioinfornat...@gmail.com 2012-10-08 
04:32:24 PDT ---
(In reply to comment #0)
 D lexer do not understand unicode char … for variadic.
 
 from some keayboard layout is faster to write … than ...
 
 
 import std.stdio;
 import std.algorithm;
 import std.array;
 
 void main( ){
 immutable int[] a = [4, 6, 1, 2,];
 immutable int[] b = cast(immutable) a.dup
 .sort!( (x,y) = x  y )
 .array;
 writeln( b );
 }

oops bad paste sorry


import std.stdio;

void foo( int[] params … ){
foreach( param; params )
writeln( praram );
}

void main(){
foo( 1, 2, 3, 4 );
}

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


[Issue 7065] align() refused for struct defined inside functions

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7065



--- Comment #2 from github-bugzi...@puremagic.com 2012-10-08 04:44:27 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d04348f37e3bfb9e7976f2c360c5c06b4d6f62fd
Issue 7065 - align() refused for struct defined inside functions

https://github.com/D-Programming-Language/dmd/commit/381eec8240dcc8eeacd9d81285b77f4324f32090
Merge pull request #562 from 9rnsr/fix6534

Issue 6534  7065  7172 - Parser improvements for inner aggregates

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


[Issue 6534] const struct definition inside functions too

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6534


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||yebbl...@gmail.com
 Resolution||FIXED


--- Comment #7 from yebblies yebbl...@gmail.com 2012-10-08 22:44:52 EST ---
https://github.com/D-Programming-Language/dmd/commit/381eec8240dcc8eeacd9d81285b77f4324f32090

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


[Issue 7065] align() refused for struct defined inside functions

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7065


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||yebbl...@gmail.com
 Resolution||FIXED


--- Comment #3 from yebblies yebbl...@gmail.com 2012-10-08 22:44:59 EST ---
https://github.com/D-Programming-Language/dmd/commit/381eec8240dcc8eeacd9d81285b77f4324f32090

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


[Issue 6534] const struct definition inside functions too

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6534



--- Comment #6 from github-bugzi...@puremagic.com 2012-10-08 04:44:21 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0adbdc1d860a1d718d36fc6a982aaeb7667ed1d8
Issue 6534 - const struct definition inside functions too

https://github.com/D-Programming-Language/dmd/commit/381eec8240dcc8eeacd9d81285b77f4324f32090
Merge pull request #562 from 9rnsr/fix6534

Issue 6534  7065  7172 - Parser improvements for inner aggregates

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


[Issue 7172] nested class with additional attributes is not supported

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7172


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||yebbl...@gmail.com
 Resolution||FIXED


--- Comment #3 from yebblies yebbl...@gmail.com 2012-10-08 22:45:07 EST ---
https://github.com/D-Programming-Language/dmd/commit/381eec8240dcc8eeacd9d81285b77f4324f32090

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


[Issue 8782] D lexer do not understand unicode char … for variadic

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8782


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #2 from bearophile_h...@eml.cc 2012-10-08 04:46:17 PDT ---
The idea of using unicode glyphs in source code is interesting, and I think the
now dead Fortress shows it's useful if done well. But introducing such change
in D, and requiring a smart editor, just for a single symbol is a bit too much
for too much little.

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


[Issue 6174] Initialize const fixed-size array in constructor

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6174



--- Comment #9 from Kenji Hara k.hara...@gmail.com 2012-10-08 05:35:43 PDT ---
(In reply to comment #8)
 Is this expected? Do you want me to put this in a new bug report?
 
 struct Foo {
 int[1] bar;
 }
 const Foo[1] foos;
 static this() {
 foreach (i; 0 .. foos.length)
 foos[i].bar[i] = 1; // OK
 foreach (i, ref f; foos)
 f.bar[i] = 1; // Error
 }
 void main() {}

Hmm, it's interesting. The accessed memory through the reference 'f' would
specify a part of the constructed fields, and compiler would be able to detect
it in statically.

Please put in a new report.

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


[Issue 8773] [CTFE] foreach ref element doesn't work well at compile time.

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8773


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #1 from Don clugd...@yahoo.com.au 2012-10-08 06:02:34 PDT ---
Duplicate of bug 7658?

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


[Issue 8778] Struct with core.simd type has wrong size and gives Segmentation fault

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8778


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au
Version|2.041   |D2


--- Comment #1 from Don clugd...@yahoo.com.au 2012-10-08 06:05:55 PDT ---
(In reply to comment #0)
 I have this problem in version 2.060 (but I had to select 2.041 because that's
 the newest version in the bug tracker)

Those specific version numbers are obsolete. Just use D1, D2, or D1  D2.

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


[Issue 8773] [CTFE] foreach ref element doesn't work well at compile time.

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8773


SHOO zan77...@nifty.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #2 from SHOO zan77...@nifty.com 2012-10-08 07:41:36 PDT ---
Hm... By all appearance it looks like it.

*** This issue has been marked as a duplicate of issue 7658 ***

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


[Issue 7658] [CTFE] assignment to reference in foreach fails without error message

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7658


SHOO zan77...@nifty.com changed:

   What|Removed |Added

 CC||zan77...@nifty.com


--- Comment #1 from SHOO zan77...@nifty.com 2012-10-08 07:41:36 PDT ---
*** Issue 8773 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 8782] D lexer do not understand unicode char … for variadic

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8782


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||WONTFIX
   Severity|normal  |enhancement


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-10-08 
08:02:16 PDT ---
I agree with bearophile. While D is a fully unicode language, the rest of the
programming ecosystem is not there yet, and it would just be grief to make such
changes now.

Maybe in 10 years.

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


[Issue 8783] New: ref foreach update of const fixed size arrays in constructor

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8783

   Summary: ref foreach update of const fixed size arrays in
constructor
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-10-08 10:20:50 PDT ---
This is a spinoff of Issue 6174


struct Foo {
int[1] bar;
}
const Foo[1] foos;
static this() {
foreach (i; 0 .. foos.length)
foos[i].bar[i] = 1; // OK
foreach (i, ref f; foos)
f.bar[i] = 1; // line 9, Error
}
void main() {}


DMD 2.061alpha gives:

temp.d(9): Error: cannot modify const expression f.bar[i]

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


[Issue 6174] Initialize const fixed-size array in constructor

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6174



--- Comment #10 from bearophile_h...@eml.cc 2012-10-08 10:22:27 PDT ---
(In reply to comment #9)

 Please put in a new report.

OK, Issue 8783
Thank you.

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


[Issue 8784] New: std.bigint.BigInt.infinity

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8784

   Summary: std.bigint.BigInt.infinity
   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 2012-10-08 10:31:44 PDT ---
Algorithms that use integers or floating point values sometimes need to use
int.max or double.infinity. BigInt.max is not available, because the size of a
BigInt is unbounded. So I suggest to add std.bigint.BigInt.infinity, also
usable as -BigInt.infinity, as negative.

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


[Issue 6707] Error message for mismatch of const/non-const property functions needs to improve

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6707



--- Comment #2 from github-bugzi...@puremagic.com 2012-10-08 10:48:56 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d123b58057a8116d3549418551ed7ea03f9c46cd
Fixes Issue 6707

https://github.com/D-Programming-Language/dmd/commit/b022c3c66616600cdf349d53d32983774b72fdbd
Merge pull request #1164 from AndrejMitrovic/Fix6707

Fix Issue 6707 - Print better error message on const property mismatch

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


[Issue 6707] Error message for mismatch of const/non-const property functions needs to improve

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6707


Brad Roberts bra...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bra...@puremagic.com
 Resolution||FIXED


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


[Issue 7074] std.concurrency.receive segfaults when called from new thread

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7074


ratchet freak ratchet.fr...@gmail.com changed:

   What|Removed |Added

 CC||ratchet.fr...@gmail.com


--- Comment #1 from ratchet freak ratchet.fr...@gmail.com 2012-10-08 11:07:31 
PDT ---
fix: use thisTid in recieve instead of accessing mbox directly

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


[Issue 8778] Struct with core.simd type has wrong size and gives Segmentation fault

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8778



--- Comment #2 from Malte Skarupke malteskaru...@web.de 2012-10-08 12:25:14 
PDT ---
One more comment:
I can also get the non-pure Vector4 to segfault by doing this for example:
Vector4 a;
a.xyzw.array = [1, 2, 3, 4];
Vector4 b = a + a + a + a + a + a; // segfault. probably alignment issue for
one of the temporaries

Should I create a separate bug for this or should I keep these as one ticket?

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


[Issue 8785] New: feature request: static mixin

2012-10-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8785

   Summary: feature request: static mixin
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: luka8...@owave.net


--- Comment #0 from luka8088 luka8...@owave.net 2012-10-08 12:43:25 PDT ---
Currently, there is no way of encapsulating mixin templates as static keyword
has no effect.

import std.stdio;

mixin template myTemplate () {
  void fn () {
writeln(myTemplate);
  }
}

struct myStruct {
  static mixin myTemplate t1; // static keyword has no effect
}

void main () {
  myStruct s1;
  s1.t1.fn(); // myTemplate
  s1.fn(); // myTemplate
}

I would kindly request that static keyword encapsulates the template members so
that s1.fn is not directly accessible but rather only as s1.t1.fn

One hack proposal was to use

static struct t1 {
  mixin myTemplate;
}

but that turned out to be a bed idea because in that case mixin code can't use
this to access myStruct

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