[Issue 8400] static array type cannot interpret dynamic array length

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8400



--- Comment #2 from github-bugzi...@puremagic.com 2012-07-19 23:53:42 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/b4b6211c519cc744c83e2985fcfaafe68c0fad19
fix Issue 8400 - static array type cannot interpret dynamic array length

Local variables always should be interpreted to detect whether it is really
constant expression or not.

https://github.com/D-Programming-Language/dmd/commit/0dad66820b826d4ee55a82f0a692548c5bd511af
Merge pull request #1058 from 9rnsr/fix8400

Issue 8400 - static array type cannot interpret dynamic array length

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


[Issue 8121] scope ref is perfectly OK

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8121


Matthias Walter xa...@xammy.info changed:

   What|Removed |Added

 CC||xa...@xammy.info


--- Comment #2 from Matthias Walter xa...@xammy.info 2012-07-19 23:58:04 PDT 
---
Does this bug report also cover the case of *returning* scope ref in order to
make the following possible:

scope ref T opIndex(...);

For example in std.container.Array this is helpful in order to write

array[0].method()

because for by-value opIndex the method() is called on a *copy* of the first
element!

On the other hand returning by (the usual) ref prevents the container from
being a 'sealed container' and hence the restriction would say:

opIndex returns by reference but this reference may not be escaped but only be
used to call a method (including operators) on the returned object.

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


[Issue 4301] BigInt * const(BigInt) doesn't work well

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4301


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

   What|Removed |Added

 CC||clugd...@yahoo.com.au
 Depends on||8395


--- Comment #2 from Don clugd...@yahoo.com.au 2012-07-20 00:07:13 PDT ---
This is blocked by bug 8395.

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


[Issue 8402] New: Lambda argument's default value is not taken into account

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8402

   Summary: Lambda argument's default value is not taken into
account
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: kolo...@bk.ru


--- Comment #0 from Artem Borisovskiy kolo...@bk.ru 2012-07-20 05:33:24 PDT 
---
The following code does not compile (x.d):

void main()
{
auto fn = (int x = 0) = x + 1;
fn();
}

with message: x.d(4): Error: expected 1 function arguments, not 0
However, calling fn() with an explicit argument works fine as usual.

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


[Issue 7176] Lambda = syntax for function and methods too

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7176


Artem Borisovskiy kolo...@bk.ru changed:

   What|Removed |Added

 CC||kolo...@bk.ru


--- Comment #10 from Artem Borisovskiy kolo...@bk.ru 2012-07-20 05:37:43 PDT 
---
 class Foo
 {
 @property int bar;
 }
 
 Is lowered to this:
 
 class Foo
 {
 private int bar_;
 
 @property int bar () { return bar_; }
 @property int bar (int value) { return bar_ = value; }
 }

Why not just make bar_ public? You do not add any code to the getter nor to the
setter anyway.

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


[Issue 7176] Lambda = syntax for function and methods too

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7176



--- Comment #11 from Jacob Carlborg d...@me.com 2012-07-20 07:06:34 PDT ---
(In reply to comment #10)

 Why not just make bar_ public? You do not add any code to the getter nor to 
 the
 setter anyway.

Perhaps I want it to be virtual, to be able to override it in a subclass.

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


[Issue 7936] std.random.randomSample always returns the same first value when passed a random number generator

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7936


Joseph Rushton Wakeling joseph.wakel...@webdrake.net changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #2 from Joseph Rushton Wakeling joseph.wakel...@webdrake.net 
2012-07-20 07:07:26 PDT ---
With the merging of pull request 553 this bug has now been fixed:
https://github.com/D-Programming-Language/phobos/pull/553

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


[Issue 7176] Lambda = syntax for function and methods too

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7176



--- Comment #12 from David Piepgrass qwertie...@gmail.com 2012-07-20 08:59:15 
PDT ---
(In reply to comment #11)
 (In reply to comment #10)
  Why not just make bar_ public? You do not add any code to the getter nor to 
  the
  setter anyway.
 
 Perhaps I want it to be virtual, to be able to override it in a subclass.

Yes, or, quite often I want to write a trivial getter but a nontrivial setter.
So I'd like just the getter for free. Also, when the interface is going to be
exported, even a trivial property should often be a property instead of a
field, to avoid breaking binary compatibility if one changes one's mind and
wants to make it a property later (actually this even affects source
compatibility--a property can't be passed by reference).

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


[Issue 7176] Lambda = syntax for function and methods too

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7176



--- Comment #13 from Jonathan M Davis jmdavisp...@gmx.com 2012-07-20 10:06:53 
PDT ---
 Yes, or, quite often I want to write a trivial getter but a nontrivial setter.
 So I'd like just the getter for free. Also, when the interface is going to be
 exported, even a trivial property should often be a property instead of a
 field, to avoid breaking binary compatibility if one changes one's mind and
 wants to make it a property later (actually this even affects source
 compatibility--a property can't be passed by reference).

That's why I've been tempted to suggest that @property on a variable made it so
that only operations which would still be legal if it were switched to being a
property function were allowed. I can't remember whether I ever actually opened
an enhancement request on that though. I'd have to go digging to find out.

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


[Issue 7176] Lambda = syntax for function and methods too

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7176



--- Comment #14 from Jacob Carlborg d...@me.com 2012-07-20 10:22:44 PDT ---
(In reply to comment #12)

 Yes, or, quite often I want to write a trivial getter but a nontrivial setter.
 So I'd like just the getter for free. Also, when the interface is going to be
 exported, even a trivial property should often be a property instead of a
 field, to avoid breaking binary compatibility if one changes one's mind and
 wants to make it a property later (actually this even affects source
 compatibility--a property can't be passed by reference).

Other good points.

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


[Issue 8402] Lambda argument's default value is not taken into account

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8402


Jonathan M Davis jmdavisp...@gmx.com changed:

   What|Removed |Added

 CC||jmdavisp...@gmx.com


--- Comment #1 from Jonathan M Davis jmdavisp...@gmx.com 2012-07-20 10:27:41 
PDT ---
Default arguments with lambda functions don't really make sense given that
they're generally only used in one place, that default arguments are _not_ part
of the type (they're just inserted at the call site), and that there's no way
for lambdas or function pointers to carry default arguments with them. So, the
fact that it doesn't compile is a _good_ thing, though it really should give an
error for giving a default argument and not just an error at the call site.

This is related to bug# 3646, but I'm not sure if it's strictly speaking a
duplicate or not.

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


[Issue 8395] Templated struct constructors don't implicitly convert to const

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8395


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-07-20 10:46:53 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1060

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


[Issue 7803] scope(success) in nothrow/@safe functions causes compile errors

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7803


kekeni...@yahoo.co.jp changed:

   What|Removed |Added

 CC||kekeni...@yahoo.co.jp
   Severity|minor   |normal


--- Comment #2 from kekeni...@yahoo.co.jp 2012-07-20 17:30:10 PDT ---
To make matters worse, the error message misses its location information.

Raised the severity from 'minor'.

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


[Issue 8403] New: ^^ and ^^= missing from lex.html

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8403

   Summary: ^^ and ^^= missing from lex.html
   Product: D
   Version: unspecified
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: websites
AssignedTo: nob...@puremagic.com
ReportedBy: jmdavisp...@gmx.com


--- Comment #0 from Jonathan M Davis jmdavisp...@gmx.com 2012-07-20 21:31:12 
PDT ---
http://dlang.org/expression.html mentions ^^ and ^^=, and lexer.c in dmd
definitely includes it, but lex.html does not in the definition of Token.

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


[Issue 8403] ^^ and ^^= missing from lex.html

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8403



--- Comment #1 from Jonathan M Davis jmdavisp...@gmx.com 2012-07-20 21:32:16 
PDT ---
https://github.com/D-Programming-Language/d-programming-language.org/pull/142

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


[Issue 1064] Tuples are not expanded in array initializers

2012-07-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1064



--- Comment #3 from github-bugzi...@puremagic.com 2012-07-20 21:52:54 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0e6f6211aef226d913a3c29f3ff3f11a420cdf41
Issue 1064 - Tuples are not expanded in array initializers

Expand any tuples in place. expandTuples from expression.c cannot be used
because this is an array of ExpInitializers, not Expressions.

https://github.com/D-Programming-Language/dmd/commit/162cf303c5e70bbb7b0a397b847e0b76c923ddd9
Merge pull request #690 from yebblies/issue1064

Issue 1064 - Tuples are not expanded in array initializers

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