[Issue 5628] std.math unittest disabled

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5628



--- Comment #1 from Brad Roberts  2011-04-30 22:21:19 PDT 
---
Reduced test case:

Must be built with debugging turned on, otherwise it doesn't loop:
  dmd -m64 -gc  bug-pow.d

module bug;

real pow(real x, ubyte n) @trusted pure nothrow
{
real p = 1.0;
ubyte m = n;

switch (n)
{
default:
}

while (1)
{
if (n & 1)
p *= x;
n >>= 1;
if (!n)
break;
x *= x;
}
return p;
}

int main()
{
immutable real x = 46;
immutable ubyte three = 3;
assert(pow(x,three) == x * x * x);

return 0;
}

Extracted from std/math.d, function:

typeof(Unqual!(F).init * Unqual!(G).init) pow(F, G)(F x, G n) @trusted pure
nothrow
if (isIntegral!(F) && isIntegral!(G))

And it's following unittest.

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


[Issue 5915] New: Newlines are not propagated when copy&pasting code snippets

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5915

   Summary: Newlines are not propagated when copy&pasting code
snippets
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: websites
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic  2011-04-30 
20:24:22 PDT ---
This only happens on d-programming-language.org.

If you try to copy&paste the first snippet from here:
http://d-programming-language.org/phobos/std_range.html

Pasted:
R r; // can define a range object if (r.empty) {} // can test for empty
r.popFront; // can invoke next auto h = r.front; // can get the front of the
range 

Note that Bugzilla might add its own newlines to limit text width. But there's
no newlines where there should be.

---

Copying from here:
http://www.digitalmars.com/d/2.0/phobos/std_range.html

Pasted:
R r; // can define a range object
if (r.empty) {}  // can test for empty
r.popFront;  // can invoke next
auto h = r.front; // can get the front of the range

On digitalmars.com it works ok.

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


[Issue 5913] std.range.put broken sentence

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5913


Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED


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


[Issue 5912] Small typos throughout Phobos and DMD documentation

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5912


Andrei Alexandrescu  changed:

   What|Removed |Added

 CC||and...@metalanguage.com


--- Comment #6 from Andrei Alexandrescu  2011-04-30 
16:48:49 PDT ---
The general Merriam-Webster dictionary lists the word
(http://www.merriam-webster.com/dictionary/iff) which supports closing the bug
as invalid. Thanks Andrej for the scrutiny.

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


[Issue 5912] Small typos throughout Phobos and DMD documentation

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5912



--- Comment #5 from Walter Bright  2011-04-30 
15:07:49 PDT ---
(In reply to comment #4)
> Wow, I've never heard of this before. Do you expect non-english readers to 
> know
> about this in advance?

I have no idea what non-native english speakers know about various jargons of
english, and I don't think it's fair to presumptively patronize anyone by
dumbing down the use of technical jargon.

I've seen iff used by math/science types in and since college. Note that Andrei
learned english rather late in life, and he's the author of some of those
instances.

If there are terms someone isn't familiar with, there's no harm in asking.
We're happy to help.

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


[Issue 5912] Small typos throughout Phobos and DMD documentation

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5912



--- Comment #4 from Andrej Mitrovic  2011-04-30 
14:19:12 PDT ---
Wow, I've never heard of this before. Do you expect non-english readers to know
about this in advance?

On the upside it does seem to be a proper word:
http://en.wikipedia.org/wiki/If_and_only_if

But if it saves you a couple of bytes of precious and expensive hard drive
space (dollars per gallon of bytes is expensive these days!) then go for it!

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


[Issue 5912] Small typos throughout Phobos and DMD documentation

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5912


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


--- Comment #3 from Walter Bright  2011-04-30 
14:14:51 PDT ---
(In reply to comment #2)
> "iff" means "if and only if".

Kenny's right.

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


[Issue 5914] New: std.range.ElementType has duplicated unittest, ElementEncodingType is missing one

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5914

   Summary: std.range.ElementType has duplicated unittest,
ElementEncodingType is missing one
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic  2011-04-30 
14:06:27 PDT ---
v2.052, std.range:

The ElementType unittest at lines 626..637 is the same unittest as lines
654..665.
The latter one should be replaced with an ElementEncodingType unittest such as:

unittest
{
string a = "foo";
wstring b = "foo";
dstring c = "foo";

static assert(is(ElementEncodingType!(typeof(a)) : char));
static assert(is(ElementEncodingType!(typeof(b)) : wchar));
static assert(is(ElementEncodingType!(typeof(c)) : dchar));  
}

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


[Issue 5912] Small typos throughout Phobos and DMD documentation

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5912


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #1 from Walter Bright  2011-04-30 
13:43:57 PDT ---
(In reply to comment #0)
> It looks like someone needs a new keyboard! :)

Well, udge that!

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


[Issue 5912] Small typos throughout Phobos and DMD documentation

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5912


kenn...@gmail.com changed:

   What|Removed |Added

 CC||kenn...@gmail.com


--- Comment #2 from kenn...@gmail.com 2011-04-30 14:07:02 PDT ---
Meh. "iff" means "if and only if". I'd say WONTFIX.

http://en.wikipedia.org/wiki/Iff

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


[Issue 5912] New: Small typos throughout Phobos and DMD documentation

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5912

   Summary: Small typos throughout Phobos and DMD documentation
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic  2011-04-30 
13:26:06 PDT ---
These are from the 2.052 release.

std.range:

line 207: returns $(D false) iff 
change to: returns $(D false) if

line 580: iff the range supports 
change to: if the range supports

line 1982: iff there are no more
change to: if there are no more

line 2843: offers random access iff 
change to: offers random access if

std.conv:

line 3839: Give an unsigned iff 
change to: Give an unsigned if

std.encoding:

line 1298: Returns true iff
change to: Returns true if

std.traits:

line 2225: Returns $(D true) iff
change to: Returns $(D true) if

std.variant:

line 251: Returns: true iff 
change to: Returns: true if

src/dmd/backend/el.c:

line 2031: Needed iff floating point
change to: Needed if floating point

It looks like someone needs a new keyboard! :)

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


[Issue 5913] New: std.range.put broken sentence

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5913

   Summary: std.range.put broken sentence
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic  2011-04-30 
13:31:57 PDT ---
line 243, release 2.052:
Outputs $(D e) to $(D r). The exact effect is dependent upon the two
types. which must be an output range. 

"which must be an output range. " <- I think this should be "r must be an
output range".

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


[Issue 3779] ["123"][0][$-1] causes __dollar unresolved in compile-time.

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3779


kenn...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #5 from kenn...@gmail.com 2011-04-30 11:52:44 PDT ---
Fixed on D2 as well.

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


[Issue 5865] __dollar cannot be read at compile time

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5865


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #3 from Walter Bright  2011-04-30 
11:30:48 PDT ---
D1 fix:
https://github.com/D-Programming-Language/dmd/commit/bd196a9020883d94c7b7c4d8a91943d5735f4f3c

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


[Issue 5840] Cannot assign to an array member of struct in CTFE

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5840


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #3 from Walter Bright  2011-04-30 
11:30:30 PDT ---
D1 fix:
https://github.com/D-Programming-Language/dmd/commit/bd196a9020883d94c7b7c4d8a91943d5735f4f3c

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


[Issue 5865] __dollar cannot be read at compile time

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5865


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #2 from Walter Bright  2011-04-30 
10:43:21 PDT ---
D2 fix:
https://github.com/D-Programming-Language/dmd/commit/0c9c52c7123e7336ce732e72099dbebd183742e2

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


[Issue 5840] Cannot assign to an array member of struct in CTFE

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5840


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #2 from Walter Bright  2011-04-30 
10:42:13 PDT ---
D2 fix:
https://github.com/D-Programming-Language/dmd/commit/0c9c52c7123e7336ce732e72099dbebd183742e2

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


[Issue 5910] Stride members' documentation comments are wrong

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5910


Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||and...@metalanguage.com
 AssignedTo|nob...@puremagic.com|and...@metalanguage.com


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


[Issue 5910] Stride members' documentation comments are wrong

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5910



--- Comment #2 from Andrej Mitrovic  2011-04-30 
06:50:37 PDT ---
Oh right, it's _n * n in the code. I think a better name for "_n" is 'step'.

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


[Issue 5911] Closure destroys the thrown Exception .

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5911


kenn...@gmail.com changed:

   What|Removed |Added

 CC||kenn...@gmail.com
   Platform|x86_64  |x86
 OS/Version|Windows |All


--- Comment #1 from kenn...@gmail.com 2011-04-30 03:52:21 PDT ---
The "x86_64" platform means the executable is 64-bit. Only Linux has 64-bit
output.

BTW, reproducible on Mac OS X also.

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


[Issue 5889] Struct literal/construction should be rvalue

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5889


Kenji Hara  changed:

   What|Removed |Added

 Depends on||3659


--- Comment #3 from Kenji Hara  2011-04-30 03:53:31 PDT ---
(In reply to comment #2)
> So, it depends on bug 3659?

Yes. I change 'Depends on' status.

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


[Issue 5910] Stride members' documentation comments are wrong

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5910


kenn...@gmail.com changed:

   What|Removed |Added

URL||http://www.digitalmars.com/
   ||d/2.0/phobos/std_range.html
   ||#stride
 CC||kenn...@gmail.com
  Component|Optlink |websites
   Platform|Other   |All
 OS/Version|Windows |All


--- Comment #1 from kenn...@gmail.com 2011-04-30 03:50:23 PDT ---
Better not conflate the two "n"s :)

opIndex(size_t i);
Forwards to input[i * n]. (etc.)

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


[Issue 5889] Struct literal/construction should be rvalue

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5889


kenn...@gmail.com changed:

   What|Removed |Added

 CC||kenn...@gmail.com


--- Comment #2 from kenn...@gmail.com 2011-04-30 03:44:08 PDT ---
(In reply to comment #1)
> Send pull request:
> https://github.com/D-Programming-Language/dmd/pull/41
> 
> After pull requested, I thought this request may be too early to fix. This fix
> may break some existing codes.
> 
> Example:
> 
> struct S {
>   int val;
>   bool opEquals(ref const(S) rhs) const {
> return val == rhs.val;
>   }
> }
> void main() {
>   S s = S(10);
>   assert(s == S(10));  // if S(10) changes from lvalue to rvalue,
>// this line makes error.
> }
> 
> 
> Should fix struct opEquals signature problem before fixing this issue.

So, it depends on bug 3659?

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


[Issue 5629] core.time unittest disabled

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5629


Jonathan M Davis  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jmdavisp...@gmx.com


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


[Issue 5911] New: Closure destroys the thrown Exception .

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5911

   Summary: Closure destroys the thrown Exception .
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: sweatygar...@yahoo.co.jp


--- Comment #0 from sweatygar...@yahoo.co.jp 2011-04-29 22:56:17 PDT ---
The below ends with SEGV.

import std.stdio;

void logout( lazy const(char)[] msg ) { writeln( msg ); }
void main()
{
string str = "hello world";
logout( (){return str;}() ); // closure 1

try throw new Exception( "exception!!" );
catch( Exception e )
{
logout( e.toString );// closure2 SEGV : e is null.
}
}



Build : dmd 2.052 on Windows Vista WOW64.

Without `closure 1', the code executed successfully.

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


[Issue 5910] New: Stride members' documentation comments are wrong

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5910

   Summary: Stride members' documentation comments are wrong
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: Optlink
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic  2011-04-29 
21:39:22 PDT ---
It seems the following std.range Stride members have the exact same comments as
Retro. I guess it was a case of copy & paste, and its reflected in the online
documentation:

opIndex(size_t n);
Forwards to input[input.length - n + 1]. Defined only if R is a random
access range and if R defines R.length.

void opIndexAssign(ElementType!(R) val, size_t n);
Forwards to input[input.length - n + 1]. Defined only if R is a random
access range and if R defines R.length.

ElementType!(R) moveAt(size_t index);
Forwards to input[input.length - n + 1]. Defined only if R is a random
access range and if R defines R.length.

typeof(this) opSlice(size_t a, size_t b);
Forwards to input[input.length - n + 1]. Defined only if R is a random
access range and if R defines R.length.

---

These are all wrong. The first one should be:
'''
opIndex(size_t n);
Forwards to input[n * n]. Defined only if R is a random access range and if
R defines R.length.
'''

and the rest need to be updated based on the implementation. (I think all of
these should be replaced with "input[n * n]")

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


[Issue 5889] Struct literal/construction should be rvalue

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5889



--- Comment #1 from Kenji Hara  2011-04-29 21:27:14 PDT ---
Send pull request:
https://github.com/D-Programming-Language/dmd/pull/41

After pull requested, I thought this request may be too early to fix. This fix
may break some existing codes.

Example:

struct S {
  int val;
  bool opEquals(ref const(S) rhs) const {
return val == rhs.val;
  }
}
void main() {
  S s = S(10);
  assert(s == S(10));  // if S(10) changes from lvalue to rvalue,
   // this line makes error.
}


Should fix struct opEquals signature problem before fixing this issue.

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


[Issue 5551] opUnary-opBinary conflict

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5551


Kenji Hara  changed:

   What|Removed |Added

   Keywords||patch
 CC||k.hara...@gmail.com


--- Comment #1 from Kenji Hara  2011-04-29 20:32:11 PDT ---
Patch create and send pull request:
https://github.com/D-Programming-Language/dmd/pull/50

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


[Issue 4258] "auto ref" doesn't work in one or more cases

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4258


Kenji Hara  changed:

   What|Removed |Added

   Keywords||patch, rejects-valid
 CC||k.hara...@gmail.com
   Platform|x86 |All
 OS/Version|Windows |All


--- Comment #2 from Kenji Hara  2011-04-29 20:42:29 PDT ---
Patch create and send pull request:
https://github.com/D-Programming-Language/dmd/pull/51

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


[Issue 5896] const overload matching is succumb to template parameter one

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5896



--- Comment #2 from Kenji Hara  2011-04-29 16:53:00 PDT ---
(In reply to comment #1)
> I don't understand why case 2a,2b works.
> It seems to me that case 1 is identical to:
> 
> struct X{}
> 
> T  foo(T)(const(X) _this) { return 10; }
> 
> T  foo(T)(X _this) { return 11; }
> 
> void main(){
> auto xm = X();
> assert(foo!int(xm)==11);
> }
> 
> Which fails in exactly the same way.

I have just started reading the code around the template, template function
matching may have three steps:

1. Tempate parameter vs explicit template arguments.
   ex. opCast(T)() vs opCast!X() -> T vs X
2. const overload matching on ethis
   void f(T)() vs const void f(T)() -> (mutable) vs const
3. function parameters type matching (and may inference of implict template
parameters)
   void f(X x) vs void f(const(X) x) -> X vs const(X)

The cause of this issue may be step 1 and 2, and cause of your test case may be
3.


Re-explain of my test case. on xm (type is X) lookup...
1a matching:
  step1: opCast(T) vs opCast!(int) -> MATCHconvert
  step2: through   -> MATCHconst
  -> afterward result: MATCHconvert
1b matching:
  step1: opCast(T) vs opCast!(int) -> MATCHconvert
  step2: MATCHconst if can -> !!! MATCHconst is succomb to MATCHconvert
  -> afterward result: MATCHconvert
Both result of 1a and 1b are MATCHconvert, so make ambiguous.

2a matching:
  step1: opCast(T:int) vs opCast!(int) -> MATCHexact
  step2: through
  -> afterward result: MATCHexact
2b matching:
  step1: opCast(T:int) vs opCast!(int) -> MATCHexact
  step2: MATCHconst if can -> MATCHconst
  -> afterward result: MATCHconvert
2a is more specialized than 2b, then 2a is selected.

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


[Issue 5285] bigint won't compile in 64 bit

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5285


Don  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||clugd...@yahoo.com.au
 Resolution||FIXED


--- Comment #1 from Don  2011-04-29 14:48:34 PDT ---
https://github.com/D-Programming-Language/phobos/commit/134d9e14a973fc8bd99d452b7b177153697e9634

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


[Issue 5587] Use __LINE__ to pick number in unittest block names

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5587



--- Comment #8 from Andrei Alexandrescu  2011-04-29 
13:07:43 PDT ---
(In reply to comment #5)
> (In reply to comment #4)
> > > Um, have to be careful about two unittests on the same line!
> > Why?  Either combine the functions into one,
> 
> Which introduces a complex special case.
> 
> > or disallow that possibility
> > (shouldn't be too disruptive I would think).
> 
> D has no similar dependencies on line endings, this would be a bizarre
> exception.

Yah. Probably a simple practical solution is to define a name for the unittest
depending on __FILE__ and __LINE__  for single unittests, and to add a count
only for several unittests on the same line. This makes the common case simple
and the exceedingly rare exception handled with panache. For example:

unittest { a(); }
unittest { b(); } unittest { c(); }

The first unittest is "unittest at foo/bar/baz.d:238", the second unittest is
"unittest #1 at foo/bar/baz.d:239", and the third is "unittest #2 at
foo/bar/baz.d:239". That takes care of everything.

BTW Walter I appreciate you giving a look to this. It's a simple addition that
would drastically improve the conviviality of unittests.

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


[Issue 5587] Use __LINE__ to pick number in unittest block names

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5587



--- Comment #7 from Steven Schveighoffer  2011-04-29 
12:59:43 PDT ---
(In reply to comment #5)
> > Why?  Either combine the functions into one,
> 
> Which introduces a complex special case.

Actually, you are right, this solution requires complex rewriting of the code. 
Probably not worth the effort.

> > or disallow that possibility
> > (shouldn't be too disruptive I would think).
> 
> D has no similar dependencies on line endings, this would be a bizarre
> exception.

It's not that bizarre.  It doesn't even have to go into the grammar.  All that
happens is you have the auto-namer name the two unit tests the same, and let
the semantic pass reject it (duplicate function definition).  This can easily
be explained to the user in the docs.

Besides, who puts two function blocks on the same line anyways?  I've seen
people write one or two statement functions on the same line, but never more
than one of those on the same line (except in obfuscation contests, but who
writes unit tests for those?)

My prediction is that if you did this you will never ever hear a complaint
about it :)

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


[Issue 5587] Use __LINE__ to pick number in unittest block names

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5587


kenn...@gmail.com changed:

   What|Removed |Added

 CC||kenn...@gmail.com


--- Comment #6 from kenn...@gmail.com 2011-04-29 12:55:00 PDT ---
(In reply to comment #1)
> It's a good idea. Actually, file and line.

"File" is not needed because the module's name is already part of the mangled
name of the unittest.

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


[Issue 5587] Use __LINE__ to pick number in unittest block names

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5587



--- Comment #5 from Walter Bright  2011-04-29 
12:40:25 PDT ---
(In reply to comment #4)
> > Um, have to be careful about two unittests on the same line!
> Why?  Either combine the functions into one,

Which introduces a complex special case.

> or disallow that possibility
> (shouldn't be too disruptive I would think).

D has no similar dependencies on line endings, this would be a bizarre
exception.

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


[Issue 5905] Error message with const fixed-size array

2011-04-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5905


kenn...@gmail.com changed:

   What|Removed |Added

 CC||kenn...@gmail.com


--- Comment #1 from kenn...@gmail.com 2011-04-29 11:42:15 PDT ---
What do you suggest? "Missing value for a constant fixed array"?

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