[Issue 2733] Unclear semantics of template value parameters

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


s...@iname.com changed:

   What|Removed |Added

 CC||s...@iname.com




--- Comment #1 from s...@iname.com  2009-04-01 04:53 ---
Non-alias template arguments are, by definition, compile-time constants.  s
isn't a compile-time constant - it's a mutable reference to immutable data.  So
this shouldn't compile.


-- 



[Issue 2733] Unclear semantics of template value parameters

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





--- Comment #2 from samu...@voliacable.com  2009-04-01 05:13 ---
I'm not that sure anymore. Actually, I wouldn't mind if they were passed by
alias. Then, I could write simply

template foo(string s)
{}

instead of

template foo(alias s) if (isString!(s))
{}

If I want to restrict template arguments to statically known values, I can use
a isCompileTime constraint

template foo(string s) if (isCompileTime!(s))
{
}


-- 



[Issue 2515] Lots of pure and nothrow functions not marked as such.

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


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #2 from clugd...@yahoo.com.au  2009-04-01 06:03 ---
I'm marking this as closed, since the examples given (functions in std.math)
are pure nothrow from DMD 2.027, in every case which is currently possible.

In general, at the present time, marking Phobos functions as 'pure nothrow' is
a work-in-progress, not a bug.


-- 



[Issue 2433] Assertion failure: 't-deco' on line 604 in file 'mtype.c'

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


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Comment #1 from clugd...@yahoo.com.au  2009-04-01 06:08 ---


*** This bug has been marked as a duplicate of 1994 ***


-- 



[Issue 716] -inline: conditinal compilation of an empty foreach body causes the compiler to segfault

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


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

   What|Removed |Added

 Status|REOPENED|RESOLVED
   Keywords||patch
 Resolution||FIXED




--- Comment #4 from clugd...@yahoo.com.au  2009-04-01 07:19 ---
Works for me. The code in DMD 2.027 is exactly as described by David. I guess
it was fixed at some point.


-- 



[Issue 2776] New: pragma(lib, does not work when used in headers

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

   Summary: pragma(lib, does not work when used in headers
   Product: D
   Version: 1.041
  Platform: PC
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: bugzi...@digitalmars.com
ReportedBy: ben...@tionex.de


I tried to use the pragma(lib, ...) feature without success.

I build a lib called org.eclipse.swt.win32.win32.x86.lib, the source contain
several pragma declarations:

pragma(lib, comctl32.lib); // and more win32 libs
pragma(lib, org.eclipse.swt.win32.win32.x86.lib); // link to the lib itself

The module with those pragmas is always imported if the lib is used.

Now, when i compile a example using the lib and turn on verbose, dmd prints all
those lib lines
...
library   comctl32.lib
library   org.eclipse.swt.win32.win32.x86.lib
...

Later it prints the commands it passes to link.exe, here the libs are
missing:
c:\Project\dwtinst\tango-0.99.8-bin-win32-dmd.1.041\bin\link.exe
C:\Project\dwtinst\dwt-rcp\obj\SwtSnippet10,C:\Project\dwtinst\dwt-rcp\bin\SwtSnippet10.exe,,user32+kernel32/noi+C:\Project\dwtinst\dwt-rcp\lib\+tango-user-dmd.lib;

The result are all those symbols are missing.


-- 



[Issue 1928] dmd SEGV with too many template parameters

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


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME




--- Comment #1 from clugd...@yahoo.com.au  2009-04-01 07:26 ---
No longer segfaults in DMD2.027.

bug.d(5): Error: template instance bar!(foo,foo) does not match template
declara
tion bar(alias E)


-- 



[Issue 1916] dmd ice on invalid string concat

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





--- Comment #2 from clugd...@yahoo.com.au  2009-04-01 07:57 ---
Only segfaults on D2.

fog.d(2): Error: incompatible types for ((1) ~ ( foo?)): 'int' and
'immutable(
char)[]'
fog.d(2): Error: Can only concatenate arrays, not (int ~ immutable(char)[])
fog.d(2): Error: cannot implicitly convert expression (\x01 foo?) of type int
to immutable(char)[]
[SEGFAULT]


-- 



[Issue 2777] New: alias this doesn't forward __dollar and slice op.

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

   Summary: alias this doesn't forward __dollar and slice op.
   Product: D
   Version: 2.027
  Platform: PC
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: bugzi...@digitalmars.com
ReportedBy: dsim...@yahoo.com


import std.stdio;
struct ArrayWrapper(T) {
T[] array;
alias array this;
}

void main() {
ArrayWrapper!(uint) foo;
foo.length = 5;  // Works
foo[0] = 1;  // Works
writeln(foo[0]);  // Works
writeln(foo[$ - 1]);  // Error:  undefined identifier __dollar
writeln(foo[0..2]);  // Error:  ArrayWrapper!(uint) cannot be sliced with
[]
}


-- 



[Issue 867] Error messages refer to _dtor instead of ~this

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


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

   What|Removed |Added

   Keywords||patch




--- Comment #1 from clugd...@yahoo.com.au  2009-04-01 09:47 ---
The 'scope' error has already been fixed for D2, but not for D1.

This simple patch changes  __dtor into ~this, by analogy to how it's done for
constructors.


Index: declaration.h
===
--- declaration.h   (revision 21)
+++ declaration.h   (working copy)
@@ -661,6 +661,8 @@
 Dsymbol *syntaxCopy(Dsymbol *);
 void semantic(Scope *sc);
 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
+const char *kind();
+char *toChars();
 int isVirtual();
 int addPreInvariant();
 int addPostInvariant();
Index: func.c
===
--- func.c  (revision 21)
+++ func.c  (working copy)
@@ -2592,6 +2592,16 @@
 return FALSE;
 }

+const char *DtorDeclaration::kind()
+{  
+return destructor;
+}
+
+char *DtorDeclaration::toChars()
+{
+return (char *)~this;
+}
+
 int DtorDeclaration::isVirtual()
 {
 /* This should be FALSE so that dtor's don't get put into the vtbl[],


-- 



[Issue 2235] false unreachable statement detected, no linenumbers shown (-w only)

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


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

   What|Removed |Added

  BugsThisDependsOn||2463
   Keywords||diagnostic




--- Comment #1 from clugd...@yahoo.com.au  2009-04-01 10:31 ---
Only applies to DMD1. The missing line number bug is the same as 2463.


-- 



[Issue 920] Auto classes referenced where scope should be used

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


matti.niemenmaa+dbugzi...@iki.fi changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED




--- Comment #4 from matti.niemenmaa+dbugzi...@iki.fi  2009-04-01 11:52 
---
Fixed with DMD 1.042.


-- 



[Issue 2778] New: alias this + IFTI doesn't work.

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

   Summary: alias this + IFTI doesn't work.
   Product: D
   Version: 2.027
  Platform: PC
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: bugzi...@digitalmars.com
ReportedBy: dsim...@yahoo.com


DMD 2.027 can't implicitly instantiate templates properly based on implicit
conversions via alias this.

import std.stdio;

struct ArrayWrapper(T) {
T[] data;
alias data this;
}

void doStuffTempl(T)(T[] data) {}

void doStuffFunc(int[] data) {}

void main() {
ArrayWrapper!(int) foo;
doStuffFunc(foo);  // Works.
doStuffTempl!(int)(foo);  // Works.

// Error: template test.doStuffTempl(T) does not match any function
// template declaration
// Error: template test.doStuffTempl(T) cannot deduce
// template function from argument types !()(ArrayWrapper!(int))
doStuffTempl(foo);
}


-- 



[Issue 1386] string expected when using allMembers-element in __traits(getMember, ...)

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


mrmoc...@gmx.de changed:

   What|Removed |Added

 CC||mrmoc...@gmx.de
   Severity|normal  |blocker
Version|2.003   |2.027




-- 



[Issue 920] Auto classes referenced where scope should be used

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





--- Comment #5 from bugzi...@digitalmars.com  2009-04-01 13:46 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 2591] custom allocator new argument should be size_t instead of uint

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:47 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 2689] seek behaves incorrectly on MAC OSX

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #3 from bugzi...@digitalmars.com  2009-04-01 13:47 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 2705] Response file size cannot exceed 64kb

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:47 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 2744] wrong init tocbuffer of forstatement

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #3 from bugzi...@digitalmars.com  2009-04-01 13:49 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 2747] improper toCBuffer of funcexp

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:49 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 2750] Optimize slice copy with size known at compile time

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #3 from bugzi...@digitalmars.com  2009-04-01 13:49 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 2751] incorrect scope storage class vardeclaration tocbuffer

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:50 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 2731] Errors in associative array example

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:48 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 2570] Patch for some mistakes in Ddoc comments.

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #4 from bugzi...@digitalmars.com  2009-04-01 13:46 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 2711] -H produces bad headers files if function defintion is templated and have auto return value

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #2 from bugzi...@digitalmars.com  2009-04-01 13:48 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 2745] missing token tochars in lexer.c

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:49 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 1645] can override base class' const method with non-const method

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #2 from bugzi...@digitalmars.com  2009-04-01 13:51 ---
Fixed DMD 2.027


-- 



[Issue 2336] link to nonexistent std_array.html

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED




--- Comment #6 from bugzi...@digitalmars.com  2009-04-01 13:51 ---
Fixed DMD 2.027


-- 



[Issue 2767] DMD incorrectly mangles NTFS stream names

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED




--- Comment #5 from bugzi...@digitalmars.com  2009-04-01 13:50 ---
Fixed DMD 1.042 and 2.027


-- 



[Issue 2595] template ctors crash compiler

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:52 ---
Fixed DMD 2.027


-- 



[Issue 2596] Variadic constructors don't compile

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #10 from bugzi...@digitalmars.com  2009-04-01 13:52 ---
Fixed DMD 2.027


-- 



[Issue 2626] template function not working against template struct instantiated with default arguments

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #2 from bugzi...@digitalmars.com  2009-04-01 13:53 ---
Fixed DMD 2.027


-- 



[Issue 1923] GC optimization for contiguous pointers to the same page

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #7 from bugzi...@digitalmars.com  2009-04-01 13:51 ---
Fixed DMD 1.042


-- 



[Issue 2674] Copy postblit constructor this(this) not called for members

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:53 ---
Fixed DMD 2.027


-- 



[Issue 2700] typeof tests stops compilation abruptly

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #3 from bugzi...@digitalmars.com  2009-04-01 13:53 ---
Fixed DMD 2.027


-- 



[Issue 2722] ICE with variadic template parameters

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:54 ---
Fixed DMD 2.027


-- 



[Issue 2723] ICE with variadic template parameters, different case

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #2 from bugzi...@digitalmars.com  2009-04-01 13:54 ---
Fixed DMD 2.027


-- 



[Issue 2725] Pattern matching in static if not working with variadic arguments

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #2 from bugzi...@digitalmars.com  2009-04-01 13:54 ---
Fixed DMD 2.027


-- 



[Issue 2724] Persistent segfaults in templated code

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:54 ---
Fixed DMD 2.027


-- 



[Issue 2574] std.c.stdio doesn't compile: va_list not defined!

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #2 from bugzi...@digitalmars.com  2009-04-01 13:52 ---
Fixed DMD 2.027


-- 



[Issue 2728] Bogus Error message on const ref return

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:55 ---
Fixed DMD 2.027


-- 



[Issue 2729] hash_t undocumented and unnecessary

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #3 from bugzi...@digitalmars.com  2009-04-01 13:55 ---
Fixed DMD 2.027


-- 



[Issue 2746] Make float.init signalling NaN by default

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #3 from bugzi...@digitalmars.com  2009-04-01 13:56 ---
Fixed DMD 2.027


-- 



[Issue 2752] std.xml does not encode CData correctly

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #2 from bugzi...@digitalmars.com  2009-04-01 13:56 ---
Fixed DMD 2.027


-- 



[Issue 2756] Bad code generation for pure nothrow math functions

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #3 from bugzi...@digitalmars.com  2009-04-01 13:57 ---
Fixed DMD 2.027


-- 



[Issue 2754] The error message regarding implicit conversion to shared doesn't mention shared in the message.

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:57 ---
Fixed DMD 2.027


-- 



[Issue 2727] std.date Cyclic dependency

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:55 ---
Fixed DMD 2.027


-- 



[Issue 2739] _argptr is invalid for functions nested in class methods

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:56 ---
Fixed DMD 2.027


-- 



[Issue 2766] DMD hangs with 0%cpu

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #3 from bugzi...@digitalmars.com  2009-04-01 13:58 ---
Fixed DMD 2.027


-- 



[Issue 2755] ICE on invalid ref returns in linked objects: Assertion failure: 'type' on line 6566 in file 'expression.c'. No ICE or error if invalid code is local to the file.

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:57 ---
Fixed DMD 2.027


-- 



[Issue 2761] Unreachable statement warning in std.string

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


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from bugzi...@digitalmars.com  2009-04-01 13:57 ---
Fixed DMD 2.027


-- 



[Issue 2779] New: alias this + tuple expansion on function call doesn't work

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

   Summary: alias this + tuple expansion on function call doesn't
work
   Product: D
   Version: 2.027
  Platform: PC
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: bugzi...@digitalmars.com
ReportedBy: dsim...@yahoo.com


struct Tuple(T...) {
T data;
alias data this;
}

void doStuff(uint a, float b) {}

void main() {
Tuple!(uint, float) foo;
doStuff(foo[0], foo[1]); // Works.
doStuff(foo.tupleof);  // Works.
doStuff(foo.data);  // Works.

// Error: function test.doStuff (uint a, float b)
// does not match parameter types (Tuple!(uint,float))
// Error: cannot implicitly convert expression (foo) of type
// Tuple!(uint,float) to uint|
// Error: expected 2 function arguments, not 1
doStuff(foo);
}


-- 



[Issue 2780] New: ref Return Allows modification of immutable data

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

   Summary: ref Return Allows modification of immutable data
   Product: D
   Version: 2.027
  Platform: PC
OS/Version: Windows
Status: NEW
  Keywords: accepts-invalid
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: bugzi...@digitalmars.com
ReportedBy: dsim...@yahoo.com


import std.stdio;

struct Immutable {
immutable uint[2] num;

ref uint opIndex(uint index) immutable {
return num[index];
}
}

void main() {
immutable Immutable foo;
writeln(foo[0]);  // Prints 0.
foo[0]++;
writeln(foo[0]);  // Prints 1.
}

Probably related to the fix for bug 2728 because the weird error message
provided by 2728 was what used to prevent this bug from happening.


-- 



[Issue 2319] Win32 Exception not very useful

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


to...@yahoo.com changed:

   What|Removed |Added

 CC||to...@yahoo.com




--- Comment #2 from to...@yahoo.com  2009-04-01 15:03 ---
Still get Error: Win32 Exception with this code:

---
void main()
{
asm { int 3; }
}
---

No big deal for me, I just tried out of curiousity.  Thought I'd mention it,
though.


-- 



[Issue 2625] Creating new struct with literal bypasses immutability of members if struct is in array

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


dsim...@yahoo.com changed:

   What|Removed |Added

   Severity|normal  |critical
   Keywords|spec|accepts-invalid
Summary|Inconsistent behavior with  |Creating new struct with
   |const/immutable struct  |literal bypasses
   |members |immutability of members if
   ||struct is in array




--- Comment #1 from dsim...@yahoo.com  2009-04-01 15:06 ---
Upon thinking about this some more, it's pretty clear that one should *not* be
able to change the value in an existing memory location by creating a whole new
struct, i.e. the following is bad:

struct Pair {
immutable uint g1;
uint g2;
}

void main() {
Pair[1] stuff;
stuff[0] = Pair(1, 2);  // Modify immutable by rebinding whole struct.
}

Note that the same thing happens if stuff is a dynamic array instead of a
static array.  Upping severity, giving more descriptive title.


-- 



[Issue 1386] string expected when using allMembers-element in __traits(getMember, ...)

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


dhase...@gmail.com changed:

   What|Removed |Added

Version|2.027   |2.003




--- Comment #4 from dhase...@gmail.com  2009-04-01 17:44 ---
Leave the version number on the _earliest_ dmd version exhibiting the problem.


-- 



[Issue 1386] string expected when using allMembers-element in __traits(getMember, ...)

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


dhase...@gmail.com changed:

   What|Removed |Added

   Severity|blocker |normal




--- Comment #5 from dhase...@gmail.com  2009-04-01 17:47 ---
Also, you can work around this using a for-loop (I think) or recursive
templates; and blocker refers to a bug sufficiently severe that Walter should
drop everything else and fix this bug, or even possibly roll back to an earlier
version that does not exhibit the bug.


-- 



[Issue 1386] string expected when using allMembers-element in __traits(getMember, ...)

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





--- Comment #6 from mrmoc...@gmx.de  2009-04-01 17:54 ---
Ok, sorry didn't know.

Finally managed to compile a workaround:
template Sequence(size_t count, size_t index = 0)
{
static if (index  count)
alias Tuple!(index, Sequence!(count, index + 1)) Sequence;  
else
alias Tuple!() Sequence;
}

static const members = __traits (allMembers, foo);
foreach (i; Sequence!(members.length))
{
foreach (p; ParameterTypeTuple!(__traits(getMember, foo,
members[i])))
writefln(typeid(p));
}


-- 



[Issue 2781] New: alias this doesn't work with foreach

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

   Summary: alias this doesn't work with foreach
   Product: D
   Version: 2.027
  Platform: PC
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: bugzi...@digitalmars.com
ReportedBy: dsim...@yahoo.com


struct Tuple(T...) {
T data;
alias data this;
}

void main() {
Tuple!(uint, float) foo;
foreach(elem; foo) {}  // Error:  Cannot infer type for elem.
}

The same applies when this is aliased to an array instead of a tuple.


-- 



[Issue 2782] New: Parameter Names Should Be Visible In Function Template Constraints

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

   Summary: Parameter Names Should Be Visible In Function Template
Constraints
   Product: D
   Version: 2.016
  Platform: PC
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: bugzi...@digitalmars.com
ReportedBy: dsim...@yahoo.com


void doStuff(T)(T arg)
if(is(typeof(arg))) {
}

void main() {
doStuff(1);
}

Results:

test7.d|6|template test7.doStuff(T) if (is(typeof(arg))) does not match any
function template declaration|
test7.d|6|template test7.doStuff(T) if (is(typeof(arg))) cannot deduce
template function from argument types !()(int)

I assume the reason this does not compile is because the symbol arg is not
visible from the template constraint.


--