[Issue 10546] New: UFCS hides actual static assert failure in opDispatch

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10546

   Summary: UFCS hides actual static assert failure in opDispatch
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: diagnostic
  Severity: minor
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara  2013-07-04 23:19:18 PDT ---
From: http://forum.dlang.org/post/zxhvyfitqkbvmfsey...@forum.dlang.org

struct Fail1
{
void opDispatch(string s)()
{
static assert(false, "Tried to call a method on Fail1");
}
}

struct Fail2
{
void opDispatch(string s, T)(T arg)
{
static assert(false, "Tried to call a method on Fail2");
}
}

void main()
{
auto fail1 = Fail1();
fail1.s();  // "no property" error instead of static asset failure

auto fail2 = Fail2();
fail2.s(1); // "no property" error instead of static asset failure
}

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


[Issue 10537] Forward reference error on 'yield' toy example.

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10537


yebblies  changed:

   What|Removed |Added

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


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


[Issue 10537] Forward reference error on 'yield' toy example.

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10537



--- Comment #3 from github-bugzi...@puremagic.com 2013-07-04 21:29:00 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/b275b48bad38267183e71050c5375066745e0e33
fix Issue 10537 - Forward reference error on 'yield' toy example.

https://github.com/D-Programming-Language/dmd/commit/fcf2ed507123c54f6c3e99ce281ae61fba55a340
Merge pull request #2298 from 9rnsr/fix10537

[REG2.063] Issue 10537 - Forward reference error on 'yield' toy example.

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


[Issue 10539] [REG][2.063] Implicit pointer to array dereference for .ptr property fails

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10539



--- Comment #3 from github-bugzi...@puremagic.com 2013-07-04 18:21:13 PDT ---
Commit pushed to 2.063 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/7e86fd874a6acc0a4dcc1250f37d15b9dbf40b97
Merge pull request #2296 from 9rnsr/fix10539

[REG2.063] Issue 10539 - Implicit pointer to array dereference for .ptr
property fails
Conflicts:
test/runnable/xtest46.d

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


[Issue 10537] Forward reference error on 'yield' toy example.

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10537


Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull, rejects-valid


--- Comment #2 from Kenji Hara  2013-07-04 18:14:31 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2298

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


[Issue 10537] Forward reference error on 'yield' toy example.

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10537



--- Comment #1 from Kenji Hara  2013-07-04 17:55:07 PDT ---
Reduced test case:

struct Iota10537
{
int s,e,i;
mixin Yield10537!q{ ; };
}

auto skipStrings10537(T)(T source)
{
return "";
}

mixin template Yield10537(dstring code)
{
alias X = typeof({ enum x = rewriteCode10537(code); }());
}

dstring rewriteCode10537(dstring code)
{
skipStrings10537(code);  // IFTI causes forward reference
return "";
}

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


[Issue 10545] New: Mostly portable way to set stdout/stdin mode

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10545

   Summary: Mostly portable way to set stdout/stdin mode
   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 2013-07-04 17:25:52 PDT ---
In Phobos I'd like a (portable across different operating systems) way to set
the mode of stdout/stdin (to binary or text mode).


A not portable way to do in C on Windows is:

setmode(fileno(stdout), O_BINARY);


In Python a not portable way to do it is (works on Windows):

import os, msvcrt
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)


I think an almost portable way to do it is (this is a C99 version of freopen):

freopen(null, "wb", stdout);

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


[Issue 10539] [REG][2.063] Implicit pointer to array dereference for .ptr property fails

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10539


Walter Bright  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 10539] [REG][2.063] Implicit pointer to array dereference for .ptr property fails

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10539



--- Comment #2 from github-bugzi...@puremagic.com 2013-07-04 13:24:51 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/99265ca322625f9d76f2fcc530c83845d5485b37
Issue 10539 - Implicit pointer to array dereference for .ptr property fails

https://github.com/D-Programming-Language/dmd/commit/c7e0c6ef1085ce74e373b6096d2af40c958e32ec
Merge pull request #2296 from 9rnsr/fix10539

[REG2.063] Issue 10539 - Implicit pointer to array dereference for .ptr
property fails

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


[Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10543



--- Comment #7 from Peter Alexander  2013-07-04 
13:15:10 PDT ---
(In reply to comment #6)
> (In reply to comment #5)
> > I'm struggling to understand the confusion.
> 
> The problem is perfectly clear.
> 
> Are you already correcting this? If not, I'll take care of it.
> 
> I remember having seen this in one of my first pulls correcting map, but got
> confused about the fact there is an *explicit* test to do things wrong... Time
> to correct it for good I guess.

I'm not fixing it right now, go ahead.

I only noticed it when I looked at the source. No idea why it's explicitly
coded to be wrong...

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


[Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10543


monarchdo...@gmail.com changed:

   What|Removed |Added

 CC||monarchdo...@gmail.com


--- Comment #6 from monarchdo...@gmail.com 2013-07-04 12:51:16 PDT ---
(In reply to comment #5)
> I'm struggling to understand the confusion.

The problem is perfectly clear.

Are you already correcting this? If not, I'll take care of it.

I remember having seen this in one of my first pulls correcting map, but got
confused about the fact there is an *explicit* test to do things wrong... Time
to correct it for good I guess.

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


[Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10543



--- Comment #5 from Peter Alexander  2013-07-04 
10:54:42 PDT ---
(In reply to comment #4)
> 21 is the number of UTF-8 code units.
> Using dstring produces 7.

I am not requesting the length of the string, I am requesting the length of the
map over the string. As ranges, strings are ranges of code points, not code
units, so the number of elements in the *map* (confirmed by the output) is
seven, i.e. that is the number of times you can safely call popFront on the
map.

I'm struggling to understand the confusion.

m is a range of seven integers
m.length is 21
walkLength(m) is also 21

This is completely broken.

I fully understand that narrow strings use length to report code units, not
code points, but m is not a string, so that distinction does not apply.

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


[Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10543


  changed:

   What|Removed |Added

 CC||mailnew4s...@gmail.com


--- Comment #4 from   2013-07-04 10:47:52 PDT ---
21 is the number of UTF-8 code units.
Using dstring produces 7.

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


[Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10543



--- Comment #3 from Peter Alexander  2013-07-04 
10:43:22 PDT ---
(In reply to comment #2)
> Where's the bug here?

It says the length of [1, 1, 1, 1, 1, 1, 1] is 21. It isn't. It's 7.

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


[Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10543


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #2 from bearophile_h...@eml.cc 2013-07-04 10:41:41 PDT ---
Where's the bug here?

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


[Issue 10542] implicitly generated class ctor doesnt inherit base class ctor attributes

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10542


Kenji Hara  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 10542] implicitly generated class ctor doesnt inherit base class ctor attributes

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10542



--- Comment #3 from github-bugzi...@puremagic.com 2013-07-04 10:10:10 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/6505a8d8affb22d4d6c9c2da465e26f1d5648016
fix issue 10542 - implicitly generated class ctor doesnt inherit base
class ctor attributes

https://github.com/D-Programming-Language/dmd/commit/9af380a868c5e63bcfa1dc7d2b184d9764b680e0
Merge pull request #2297 from hpohl/10542

fix issue 10542 - implicitly generated class ctor doesn't inherit base class
ctor attributes

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


[Issue 10544] New: writeln!(inout(int)) does not work

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10544

   Summary: writeln!(inout(int)) does not work
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: and...@erdani.com


--- Comment #0 from Andrei Alexandrescu  2013-07-04 10:02:22 
PDT ---
Refer to
http://stackoverflow.com/questions/17460065/how-to-print-inout-parameters for
details. In all likelihood Unqual is the culprit.

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


[Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10543



--- Comment #1 from Peter Alexander  2013-07-04 
09:31:54 PDT ---
(In reply to comment #0)
> Clearly the reported length (21) is wrong, it should be 7.

Scratch that. length shouldn't be available at all for narrow strings as it is
unobtainable in constant time.

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


[Issue 10543] New: std.algorithm.map incorrectly uses source range length for narrow strings

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10543

   Summary: std.algorithm.map incorrectly uses source range length
for narrow strings
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: peter.alexander...@gmail.com


--- Comment #0 from Peter Alexander  2013-07-04 
09:30:32 PDT ---
void main()
{
import std.algorithm;
import std.stdio;
string s = "こんにちは世界";
auto m = s.map!(a => 1);
writeln(m, ", ", m.length);
}

Gives:

[1, 1, 1, 1, 1, 1, 1], 21

Clearly the reported length (21) is wrong, it should be 7.

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


[Issue 7322] Taking address of deprecated functions isn't refused

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7322


Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull


--- Comment #9 from Kenji Hara  2013-07-04 07:36:18 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2130

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


[Issue 10542] implicitly generated class ctor doesnt inherit base class ctor attributes

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10542


Henning Pohl  changed:

   What|Removed |Added

   Keywords||pull, rejects-valid


--- Comment #2 from Henning Pohl  2013-07-04 07:32:59 
PDT ---
https://github.com/D-Programming-Language/dmd/pull/2297

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


[Issue 10542] implicitly generated class ctor doesnt inherit base class ctor attributes

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10542



--- Comment #1 from Henning Pohl  2013-07-04 07:27:07 
PDT ---
s/M/D

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


[Issue 10542] New: implicitly generated class ctor doesnt inherit base class ctor attributes

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10542

   Summary: implicitly generated class ctor doesnt inherit base
class ctor attributes
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: henn...@still-hidden.de


--- Comment #0 from Henning Pohl  2013-07-04 07:26:45 
PDT ---
class B
{
this() nothrow pure @safe { }
}

class D : B
{
}

void test() nothrow pure @safe
{
new M;
}


main.d(12): Error: pure function 'main.test' cannot call impure function
'main.D.this'
main.d(12): Error: safe function 'main.test' cannot call system function
'main.D.this'
main.d(12): Error: constructor this is not nothrow
main.d(10): Error: function 'main.test' is nothrow yet may throw


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


[Issue 9262] compilation of erroneous source files causes segfault in Package

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9262


Don  changed:

   What|Removed |Added

   Keywords||ice
Summary|compilation of erroneous|compilation of erroneous
   |source files causes |source files causes
   |segfault|segfault in Package


--- Comment #2 from Don  2013-07-04 07:16:46 PDT ---
This is crashing in Package::~Package(). I think this has already been fixed.

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


[Issue 7780] Template mixin'd members do not properly overload

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7780


Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull, rejects-valid


--- Comment #3 from Kenji Hara  2013-07-04 05:55:37 PDT ---
(In reply to comment #0)
[snip]
> 
> foo.d(19): Error: __overloadset isn't a template
> 
> Or (without the wrapping class):
> 
> foo.d(17): Error: template instance C!(0) ambiguous template declaration
> foo.B!().C(int n : 1) and foo.A!().C(int n : 0)
> 
> The two versions of C here introduced could clearly coexist and be referred to
> as Foo.C!0 and Foo.C!1.

https://github.com/D-Programming-Language/dmd/pull/1660

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


[Issue 8579] Default parameter appears a part of typeof().stringof of a function variable

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8579


Kenji Hara  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 3866] anonymous delegate with default parameters cross-talks to another anonymous delegate

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3866


Kenji Hara  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
Version|D1 & D2 |D2
 Resolution||FIXED


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


[Issue 8579] Default parameter appears a part of typeof().stringof of a function variable

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8579



--- Comment #4 from Kenji Hara  2013-07-04 04:54:26 PDT ---
Fixed commit:
https://github.com/D-Programming-Language/dmd/commit/a711eb6b499ca85b7cfa4e758d9e968fef8d315f

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


[Issue 3646] Default values of function arguments are ignored when instantiating a template.

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3646


Kenji Hara  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
Version|D1 & D2 |D2
 Resolution||FIXED


--- Comment #13 from Kenji Hara  2013-07-04 04:51:50 PDT 
---
Right now, default argument is changed to not part of function type in D2.

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


[Issue 10528] Private constant (enum) properties not private

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10528


Henning Pohl  changed:

   What|Removed |Added

 CC||henn...@still-hidden.de
   Severity|major   |normal


--- Comment #2 from Henning Pohl  2013-07-04 04:42:55 
PDT ---
(In reply to comment #1)
> Created an attachment (id=1228) [details]
> Testcase for visibility attribute bug
> 
> A simpler testcase, visibility attribute is completely broken, it could cause
> big troubles...
> 
> tested on 2.063 on Windows XP, could someone test on other platforms ?

In D "private" and "protected" symbols are also accessible in the module they
are declared in. So your test case should compile.

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


[Issue 10528] Private constant (enum) properties not private

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10528


Adrien Pensart  changed:

   What|Removed |Added

 CC||cruncheng...@gmail.com
   Severity|normal  |major


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


[Issue 8155] Deprecate std.range.lockstep

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8155



--- Comment #17 from Joseph Rushton Wakeling  
2013-07-04 03:10:53 PDT ---
(In reply to comment #16)
> If not already present I suggest you to open an enhancement request that asks
> for your improvement of zip, and then we'll make this issue dependant to the
> other one. They are two separate issues.

Done: Issue #10541.

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


[Issue 10541] Failure writing to elements of std.range.zip

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10541



--- Comment #1 from Joseph Rushton Wakeling  
2013-07-04 03:09:54 PDT ---
Created an attachment (id=1229)
Sample code to illustrate the problem.

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


[Issue 10541] New: Failure writing to elements of std.range.zip

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10541

   Summary: Failure writing to elements of std.range.zip
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: joseph.wakel...@webdrake.net


--- Comment #0 from Joseph Rushton Wakeling  
2013-07-04 03:09:15 PDT ---
According to the documentation, std.range.zip "offers mutation and swapping if
all ranges offer it".  However, as the attached code sample shows, attempting
to write to elements of a zip in a foreach loop consistently fail, even when
accessed by ref and when all ranges in the zip are mutable.

The sample code shows (i) foreach'ing over a lockstep of a non-mutable range
and an array, writing to the array; (ii) foreach'ing over a zip of a
non-mutable range and an array; (iii) foreach'ing over a zip of two arrays,
writing to the second, with only the elements of the second accessed via ref;
(iv) foreach'ing over a zip of two arrays, accessing the elements of both via
ref.

The foreach over the lockstep results in an array with correctly-written
values, but the arrays that should be written to via foreach over zip remain
full of nan's.

This problem is also a block to the proposal in #8155 to deprecate lockstep in
favour of zip, since it makes it impossible to do a blanket replace
's/lockstep/zip/' and have the resulting code work.

At a minimum, zip should be corrected to ensure that its elements are mutable
in line with the statement made in the docs (i.e., the 3rd and 4th cases in the
sample code should result in arrays filled with correct values).  Ideally,
elements of a zip that come from a mutable range should themselves be mutable
even if the other ranges in the zip aren't (i.e. the 2nd case in the sample
code should also work).

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


[Issue 3646] Default values of function arguments are ignored when instantiating a template.

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3646



--- Comment #12 from github-bugzi...@puremagic.com 2013-07-04 03:03:45 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/877e7bfd7c29fb016323934bb04bd3420bffe5c7
Default args and arg identifiers are now volatile information in TypeFunction.

1. The extra informations would be kept after semantic analysis for function
pointer and delegate types. But merging type would strip all the extras from
the type structure, then cache the stripped copy into.

2. The types has extra informations cannot be named. In other words,
AliasDeclaration would always strip the aliased type. This rule also works for
Template Type Parameter, and fixes issue 3646 well.

3. CondExp would strip them from the type of its result.

https://github.com/D-Programming-Language/dmd/commit/bce2d07d6cd2c09a5153afc65260b63c32447ade
fix Issue 3646 - Default values of function arguments are ignored when
instantiating a template.

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


[Issue 3866] anonymous delegate with default parameters cross-talks to another anonymous delegate

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3866



--- Comment #14 from github-bugzi...@puremagic.com 2013-07-04 03:04:04 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d7362898f16d7d5e04ac4e9f374a39a5e8e0ff53
Improved fix for Issue 3866 - anonymous delegate with default parameters
cross-talks to another anonymous delegate

This reverts commit acc22ce25db42facfe4917aeceabd28a410f4c95,
and moves original test into runnable/functype.d

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


[Issue 10540] variable used before set for empty static arrays, with -inline -O

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10540


monarchdo...@gmail.com changed:

   What|Removed |Added

URL||http://forum.dlang.org/thre
   ||ad/khdhvzfdfljbtlyfqocw@for
   ||um.dlang.org
   See Also||http://d.puremagic.com/issu
   ||es/show_bug.cgi?id=7953


--- Comment #1 from monarchdo...@gmail.com 2013-07-04 02:16:29 PDT ---
Possibly related:
http://d.puremagic.com/issues/show_bug.cgi?id=7953

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


[Issue 10540] New: variable used before set for empty static arrays, with -inline -O

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10540

   Summary: variable used before set for empty static arrays, with
-inline -O
   Product: D
   Version: unspecified
  Platform: All
OS/Version: All
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: monarchdo...@gmail.com


--- Comment #0 from monarchdo...@gmail.com 2013-07-04 02:15:47 PDT ---
Thread:
http://forum.dlang.org/thread/khdhvzfdfljbtlyfq...@forum.dlang.org#post-khdhvzfdfljbtlyfqocw:40forum.dlang.org

When compiled with -O -inline:

struct S
{
int[0] a;

void do_it()
{
foo(a);
}
}

void foo(Args...)(Args args)
{
//foreach(arg; args)
//if (arg.ptr == null)
//return;

bar(args);
}

void bar(Args...)(Args args)
{
foreach(arg; args)
if (arg.ptr == null)
return;
}

void main()
{}

Produces:
main.d(11): Error: variable _param_0 used before set


Possibly the compiler optimizes out a's initialization, since it is an empty
static array.

Code is glitchy: Not only does the bug appear only in bar (and not foo),
un-commenting the code in foo will *fix* the call in bar...

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


[Issue 10539] [REG][2.063] Implicit pointer to array dereference for .ptr property fails

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10539


Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull
Version|unspecified |D2


--- Comment #1 from Kenji Hara  2013-07-04 02:09:56 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2296

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


[Issue 10528] Private constant (enum) properties not private

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10528



--- Comment #1 from Adrien Pensart  2013-07-04 01:56:36 
PDT ---
Created an attachment (id=1228)
Testcase for visibility attribute bug

A simpler testcase, visibility attribute is completely broken, it could cause
big troubles...

tested on 2.063 on Windows XP, could someone test on other platforms ?

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


[Issue 10539] New: [REG][2.063] Implicit pointer to array dereference for .ptr property fails

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10539

   Summary: [REG][2.063] Implicit pointer to array dereference for
.ptr property fails
   Product: D
   Version: unspecified
  Platform: All
OS/Version: All
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: monarchdo...@gmail.com


--- Comment #0 from monarchdo...@gmail.com 2013-07-04 01:39:36 PDT ---
---
void main()
{
int[2][2] a;
int* p1 = a.ptr.ptr;//error
int* p2 = (*a.ptr).ptr; //OK
}
---

2.063 and 2.063.2 produce:
Error: cannot resolve type for &(*& a)[0]

This used to work up to 2.062.

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


[Issue 10314] Add std.traits.signed

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10314


Kenji Hara  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 10314] Add std.traits.signed

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10314



--- Comment #2 from github-bugzi...@puremagic.com 2013-07-04 01:37:13 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/378fe783523259849beebcc7553c0a9654d0c4f9
Implement issue# 10314.

This moves std.traits.unsigned to std.conv and adds std.conv.signed,
since for some reason, we have std.traits.unsigned but do not have
std.traits.signed.

https://github.com/D-Programming-Language/phobos/commit/1b230c39c516e762a18a3a88748c52d4bfdc907a
Merge pull request #1341 from jmdavis/signed

Implement issue# 10314 (add std.traits.signed).

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


[Issue 10266] CTFE: Allow reinterpret casts T <-> T[1]

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10266



--- Comment #3 from Don  2013-07-04 01:23:30 PDT ---
(In reply to comment #2)
> (In reply to comment #1)
> > I suspect that after the cast, it might not be a genuine array.
> 
> I like the idea to not create genuine array here. Just a restricted array for
> e.g. `foreach`.

Hmmm, I don't know how to do that. This kind of feature is practically
guaranteed to fail, it creates dozens of weird special cases (and they would
all be subtle wrong-code bugs).

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


[Issue 10538] std.typecons.wrap should consider opDispatch

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10538


Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara  2013-07-04 01:10:23 PDT ---
https://github.com/D-Programming-Language/phobos/pull/1386

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


[Issue 10536] std.typecons.wrap doesn't work with a class that defines opCast

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10536


Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara  2013-07-04 01:10:18 PDT ---
https://github.com/D-Programming-Language/phobos/pull/1386

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


[Issue 10243] [CTFE] Wrong-code on passing dereferenced array pointer by ref

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10243



--- Comment #3 from Don  2013-07-04 01:14:14 PDT ---
The original test case in this bug report works for me now, and your comment
"// now works" indicates that it is fixed for you as well?

The code in comment 2 is a different bug. Although the effects look very
similar, it is actually independent of the original one. The bug lies in a
different part of the code.

Generally, you should create a new bug report rather than reopening a bug, if
the test case in the original bug report has been fixed.

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


[Issue 10538] New: std.typecons.wrap should consider opDispatch

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10538

   Summary: std.typecons.wrap should consider opDispatch
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara  2013-07-04 00:51:56 PDT ---
This code currently doesn't work, but it should.

import std.typecons;

interface Interface
{
int foo();
int bar(int);
}

class Pluggable
{
int opDispatch(string name, A...)(A args) { return 100; }
}

void main()
{
Interface i = wrap!Interface(new Pluggable());
assert(i.foo() == 100);
assert(i.bar(10) == 100);
}

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


[Issue 10537] New: Forward reference error on 'yield' toy example.

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10537

   Summary: Forward reference error on 'yield' toy example.
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2013-07-04 00:48:36 PDT ---
Compiled and ran with DMD 2.060, does not compile anymore with DMD 2.063:

http://dpaste.dzfl.pl/baa538af

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


[Issue 10536] New: std.typecons.wrap doesn't work with a class that defines opCast

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10536

   Summary: std.typecons.wrap doesn't work with a class that
defines opCast
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara  2013-07-04 00:47:34 PDT ---
std.typecons.wrap and unwrap internally uses cross-cast, but current
implementation accidentally takes opCast member functions.

Code:

import std.typecons;

interface Interface { int foo(); }
class Pluggable {
int foo() { return 1; }
@disable void opCast(T, this X)();  // !
}
void main() {
Interface i = new Pluggable().wrap!Interface;
assert(i.foo() == 1);
}

Output:

std\typecons.d(2780): Error: function test.Pluggable.opCast!(inout(Object),
inout(Pluggable)).opCast is not callable because it is annotated with @disable
std\typecons.d(2780): Error: pure function
'std.typecons.wrap!(Interface).wrap!(Pluggable).Impl._wrap_getSource' cannot
call impure function 'test.Pluggable.opCast!(inout(Object),
inout(Pluggable)).opCast'
std\typecons.d(2780): Error: cannot implicitly convert expression
(this._wrap_source.opCast()) of type void to inout(Object)
test.d(16): Error: template instance
std.typecons.wrap!(Interface).wrap!(Pluggable) error instantiating


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