[Issue 1253] array initializers as expressions are not allowed in const arrays

2009-09-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1253


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

   What|Removed |Added

   Keywords||patch




--- Comment #6 from Don clugd...@yahoo.com.au  2009-09-01 08:24:13 PDT ---
And here's a patch.
Cause: The initializer is used in declaration.c, VarDeclaration::semantic().
We see the lines:
--
Expression *e = init-toExpression();
if (!e)
{
init = init-semantic(sc, type);
e = init-toExpression();
if (!e)
--
The initializer is supposed to return NULL if the initializer semantic hasn't
been run yet. But the array initializer doesn't -- it prints an error, and
returns an ErrorExp instead! It never has a chance.

PATCH: init.c, last lines of ArrayInitializer::toExpression() (around line
473).

Lno:
delete elements;
-   error(loc, array initializers as expressions are not allowed);
-   return new ErrorExp();
+return NULL;
}

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


[Issue 3278] New: Empty tuples don't match

2009-09-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3278

   Summary: Empty tuples don't match
   Product: D
   Version: 2.032
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: critical
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bart...@relisoft.com


A tuple containing an empty tuple is not the same as an empty tuple and two
such beasts are considered incompatible.

import std.typetuple;

template TypeList(T...)
{
alias T toTuple;
}

static assert (TypeList!().toTuple == TypeTuple!());

Error: incompatible types for ((()) == (())): '()' and '()'

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


[Issue 3279] New: Type tuple comparison fails

2009-09-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3279

   Summary: Type tuple comparison fails
   Product: D
   Version: 2.032
  Platform: x86
OS/Version: Windows
Status: NEW
  Severity: blocker
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bart...@relisoft.com


I get this strange error message:

Error: incompatible types for (((long, int)) == ((long, int))): '(long, int)'
and '(long, int)'

when compiling this program:

import std.typetuple;

template TypeList(T...)
{
alias T toTuple;
}

template snoC(T, alias List)
{
alias TypeList!(List.toTuple, T) snoC;
}

static assert (snoC!(int, TypeList!(long)).toTuple == TypeTuple!(long, int));


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


[Issue 3280] New: comparing array length is wonky

2009-09-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3280

   Summary: comparing array length is wonky
   Product: D
   Version: 2.031
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: ellery-newco...@utulsa.edu


void main(){
string s;
int a = s.length;
assert(a == 0);
assert(s.length == 0);
assert(a == 0);
assert(a  -1);
assert(s.length  -1); //fails
}

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


[Issue 3280] comparing array length is wonky

2009-09-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3280


Jarrett Billingsley jarrett.billings...@gmail.com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||INVALID




--- Comment #2 from Jarrett Billingsley jarrett.billings...@gmail.com  
2009-09-01 17:09:39 PDT ---
Oops

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


[Issue 3277] DMD includes a version of OleAut32.lib which is missing some functions

2009-09-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3277


Stewart Gordon s...@iname.com changed:

   What|Removed |Added

 CC||s...@iname.com




--- Comment #1 from Stewart Gordon s...@iname.com  2009-09-01 18:27:31 PDT ---
Since when has it been just that one .lib that's out of date?

(See also issue 317 comment 1.)

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


Re: [Issue 3280] comparing array length is wonky

2009-09-01 Thread Ellery Newcomer
d-bugm...@puremagic.com wrote:
 See bug 259.
 

Oh, gosh. I need multiple votes.