[Issue 8928] Poor error message for derived class without constructor

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8928



--- Comment #5 from Jonathan M Davis jmdavisp...@gmx.com 2012-11-01 23:13:41 
PDT ---
Well, it really doesn't match the definition of synthesized at all, so I have
to wonder about whoever picked it for C++. Regardless, using it in an error
message like that isn't going to be clear to most programmers.

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


[Issue 8498] modifying foreach range iterator fails in CTFE

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8498



--- Comment #4 from github-bugzi...@puremagic.com 2012-11-01 23:49:34 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/b52dca5a53def60352dbcbf4f398c10abb2cb6b1
Fix issue 8498 modifying foreach range iterator fails in CTFE

This was caused by ignoring assignment to ref variables.
(These guys can only be created by the inliner, or by lowering,
such as happens in foreach).

Also fixes bug 7658: assignment to ref in foreach.
Also fixes bug 8539: nested functions, ref parameter, -inline.

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


[Issue 8498] modifying foreach range iterator fails in CTFE

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8498


yebblies yebbl...@gmail.com 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 7658] [CTFE] assignment to reference in foreach fails without error message

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7658


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

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


--- Comment #2 from yebblies yebbl...@gmail.com 2012-11-02 17:59:10 EST ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/b52dca5a53def60352dbcbf4f398c10abb2cb6b1
Fix issue 8498 modifying foreach range iterator fails in CTFE

This was caused by ignoring assignment to ref variables.
(These guys can only be created by the inliner, or by lowering,
such as happens in foreach).

Also fixes bug 7658: assignment to ref in foreach.
Also fixes bug 8539: nested functions, ref parameter, -inline.

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


[Issue 8539] -inline failure involving CTFE, nested functions, a ref parameter

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8539


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||yebbl...@gmail.com


--- Comment #1 from yebblies yebbl...@gmail.com 2012-11-02 18:00:34 EST ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/b52dca5a53def60352dbcbf4f398c10abb2cb6b1
Fix issue 8498 modifying foreach range iterator fails in CTFE

This was caused by ignoring assignment to ref variables.
(These guys can only be created by the inliner, or by lowering,
such as happens in foreach).

Also fixes bug 7658: assignment to ref in foreach.
Also fixes bug 8539: nested functions, ref parameter, -inline.

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


[Issue 8539] (D1 only) -inline failure involving CTFE, nested functions, a ref parameter

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8539


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords||CTFE, ice, pull
Version|D2  |D1
Summary|-inline failure involving   |(D1 only) -inline failure
   |CTFE, nested functions, a   |involving CTFE, nested
   |ref parameter   |functions, a ref parameter


--- Comment #2 from yebblies yebbl...@gmail.com 2012-11-02 18:01:26 EST ---
Fixed D2, causes an ICE with D1:

src\testx.d(6): Error: CTFE internal error: illegal reference value 0

Assertion failure: 'IsRefValueValid(newval)' on line 6243 in file 'interpret.c'

abnormal program termination

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


[Issue 7688] Ddoc should give a list of inherited members

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7688


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
01:28:10 PDT ---
I almost like Qt's documentation engine. For example:
http://qt-project.org/doc/qt-4.8/qmenubar.html

It lists overriden methods in 'Reimplemented' sections, and has a link to the
inherited class. The latter could be incorporated via Issue 198 (man that's an
ancient request).

But I would prefer if we could list inherited (non-overriden) methods in some
kind of html tree control that is minimized by default but can be expanded
rather than having to click to open the base-class page.

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


[Issue 2837] OPTLINK and LARGEADDRESSAWARE

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2837



--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-11-02 
01:30:36 PDT ---
Generally, a program that consumes all of memory can bring the system to a
halt. So only if your program really needs it should it be turned on.

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


[Issue 198] DDoc: superclass/interface decl expansion

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=198


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
 CC||andrej.mitrov...@gmail.com
 AssignedTo|bugzi...@digitalmars.com|nob...@puremagic.com


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
01:54:21 PDT ---
We could introduce DDOC_PSUPER_SYMBOL for base classes but also for enum base
types.

Can anyone chime in on whether this will be useful to have? I've got a pull
ready if we're game.

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


[Issue 3445] DDoc usually omits attributes (including pure nothrow)

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3445


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||DUPLICATE


--- Comment #6 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
02:11:51 PDT ---
Only case left is the template one, which is dup of Issue 194.

*** This issue has been marked as a duplicate of issue 194 ***

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


[Issue 194] DDoc: method-attributes ignored within templated class

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=194


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 CC||johnch_a...@hotmail.com


--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
02:11:35 PDT ---
*** Issue 2516 has been marked as a duplicate of this issue. ***

--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
02:11:51 PDT ---
*** Issue 3445 has been marked as a duplicate of this issue. ***

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


[Issue 194] DDoc: method-attributes ignored within templated class

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=194


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 CC||johnch_a...@hotmail.com


--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
02:11:35 PDT ---
*** Issue 2516 has been marked as a duplicate of this issue. ***

--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
02:11:51 PDT ---
*** Issue 3445 has been marked as a duplicate of this issue. ***

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


[Issue 8933] New: -property switch and opDispatch for methods and properties

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8933

   Summary: -property switch and opDispatch for methods and
properties
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: johnch_a...@hotmail.com


--- Comment #0 from johnch_a...@hotmail.com 2012-11-02 02:14:39 PDT ---
When the -property compiler switch is in effect, opDispatch cannot be used for
both methods and properties.

Currently, we can just omit the switch and things work fine. But if the
behaviour of the switch becomes the norm, this issue will have to be addressed.

struct Demo {
  @property auto opDispatch(string name, A...)(auto ref A args) {}
}

void main() {
  Demo d;
  d.test(1); // method call OK
  d.test(1,2);   // ditto
  d.test = 4;// property setter OK
  d.test(1,2,3); // error, properties can only have zero, one, or two parameter
}

If you omit the @property attribute from the opDispatch definition, the
compiler complains 'not a property d.opDispatch!(test)'.

Perhaps the simplest fix would be for opDispatch to be excluded from any
property rules altogether.

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


[Issue 2516] DDoc omits static on templates

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2516


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||DUPLICATE


--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
02:11:33 PDT ---
*** This issue has been marked as a duplicate of issue 194 ***

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


[Issue 8929] long.min is a Voldemort literal

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8929


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

   What|Removed |Added

Summary|long.min is a Voldermort|long.min is a Voldemort
   |literal |literal


--- Comment #2 from Don clugd...@yahoo.com.au 2012-11-02 03:17:37 PDT ---
(In reply to comment #1)
 (In reply to comment #0)
  It cannot be named.

 My *guess* is interprets the decimal number into a long, and afterwards, the
 sign is applied. This chokes in this particular case, because the valid range
 for longs is [-2^^63, 2^^63-1], so the interpreted number overflows before the
 compiler has a chance to apply the sign:

Yes, of course that's what's happening. It is a number you cannot write as a
literal, you can only use a euphemism like long.min or -2L^^63.

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


[Issue 8720] ICE: Assertion failure: '!vthis-csym' on line 727 in file 'glue.c'

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8720


tmn tmn.db...@mailinator.com changed:

   What|Removed |Added

   Keywords||ice
 CC||tmn.db...@mailinator.com
Summary|Assertion failure:  |ICE: Assertion failure:
   |'!vthis-csym' on line 727  |'!vthis-csym' on line 727
   |in file 'glue.c'|in file 'glue.c'


--- Comment #1 from tmn tmn.db...@mailinator.com 2012-11-02 04:27:00 PDT ---
I get this with the following test case:


module b;
void call(alias fun)() {
fun(0);
}

module a;
import b;
class A {
void foo(int c) {
call!(a = c);
}
}


 dmd b.d a.d
dmd: glue.c:727: virtual void FuncDeclaration::toObjFile(int): Assertion
`!vthis-csym' failed.


In addition, if I remove the class around the function foo, then I get the ICE
described in issue 2962:


module b;
void call(alias fun)() {
fun(0);
}

module a;
import b;
void foo(int c) {
call!(a = c);
}


 dmd b.d a.d
a.d(5): Error: function a.foo compiler error, parameter 'c', bugzilla 2962?
dmd: glue.c:758: virtual void FuncDeclaration::toObjFile(int): Assertion `0'
failed.


(Using DMD64 D Compiler v2.060 on Linux)

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


[Issue 8934] New: Lambda violates DMD assertion

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8934

   Summary: Lambda violates DMD assertion
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: All
Status: NEW
  Severity: major
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: dimitri.saba...@gmail.com


--- Comment #0 from Dimitri Sabadie dimitri.saba...@gmail.com 2012-11-02 
04:38:54 PDT ---
I have found something interresting with lambdas. Consider this:

string modules[] = [ foo, bar, zoo ];
string line;

/* ... */

/* now line contains something not empty */
if (any!(a = a == line)(modules)) {
/* ... */
}


I get a DMD assertion crash on the if statement:
Assertion failure: '!vthis-csym' on line 727 in file 'glue.c'

Of course, the lambda syntax is, here,
(string a) = a == line

But sometimes a = a == line also works as inference type lambda! I don’t know
why it doesn’t here. Also, this works too:
(string a) { return a == line; }

Is it the old delegate literal syntax?

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


[Issue 8934] Lambda violates DMD assertion

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8934



--- Comment #1 from Dimitri Sabadie dimitri.saba...@gmail.com 2012-11-02 
04:40:29 PDT ---
Just to precise — as the topic name does — DMD fails to say that the error is
on the lambda expression in the if statement. Instead it prints internal shit
assertions.

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


[Issue 8899] Erroneous delegate usage and map template

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8899



--- Comment #1 from Maxim Fomin ma...@maxim-fomin.ru 2012-11-02 05:04:41 PDT 
---
- issue 8934 shows same problem

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


[Issue 8934] Lambda violates DMD assertion

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8934


Maxim Fomin ma...@maxim-fomin.ru changed:

   What|Removed |Added

 CC||ma...@maxim-fomin.ru


--- Comment #2 from Maxim Fomin ma...@maxim-fomin.ru 2012-11-02 05:03:14 PDT 
---
Regarding lambdas - it is well-known issue which consists in treating lambda
expression as voids: see issue 8899. Regarding internal compiler error - please
provide exact code which shows problem.

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


[Issue 8935] New: ICE(cod3.c, cod4.c): Returning string literal casted to static array

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8935

   Summary: ICE(cod3.c, cod4.c): Returning string literal casted
to static array
   Product: D
   Version: unspecified
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: cbkbbej...@mailinator.com


--- Comment #0 from Nick Sabalausky cbkbbej...@mailinator.com 2012-11-02 
05:07:39 PDT ---
char[1] foo()
{
return cast(char[1])a;
}

$ dmd test.d
Internal error: ..\ztc\cod3.c 528

Changing to zero-length moves the ICE to cod4.c:

char[0] foo()
{
return cast(char[0]);
}

$ dmd test.d
Internal error: ..\ztc\cod4.c 359

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


[Issue 8929] long.min is a Voldemort literal

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8929



--- Comment #3 from David Eckardt david.ecka...@sociomantic.com 2012-11-02 
05:16:23 PDT ---
Although no surprise, it might be worth noting that

mixin(static assert(long.min== ~ long.min.stringof ~ ););

causes the signed integer overflow error, too.

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


[Issue 7354] ld: GOT load reloc does not point to a movq instruction

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7354


Shahid govell...@gmail.com changed:

   What|Removed |Added

 CC||govell...@gmail.com


--- Comment #1 from Shahid govell...@gmail.com 2012-11-02 05:25:25 PDT ---
__gshared long var;
void main()
{
asm{ mov [var], RAX; }
}
---
This causes the same link error on OSX64

ld: GOT load reloc does not point to a movq instruction in _D7testabi4mainFZv
from testabi.o for architecture x86_64

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


[Issue 3142] std.loader documentation missing

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3142


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
05:53:46 PDT ---
I think this is now superseeded by the core.runtime.loader

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


[Issue 8808] Header generation must recreate folder structure if -Hd is used

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8808


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 CC||jaysis...@yahoo.com


--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
05:59:22 PDT ---
*** Issue 4495 has been marked as a duplicate of this issue. ***

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


[Issue 4495] The -Hd (import file generation directory) option for DMD doesn't work correctly in 2.047.

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4495


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||DUPLICATE


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
05:59:22 PDT ---
*** This issue has been marked as a duplicate of issue 8808 ***

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


[Issue 6248] HTOD leaves out const when translating C headers

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6248


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX


--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
06:04:03 PDT ---
We have better (cross-platform) tools for .h conversion, not gonna wait for
Walter.

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


[Issue 6249] HTOD deletes files without notice

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6249


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
06:03:30 PDT ---
I must have been very angry when I filed this. :p

Anyway we have better (cross-platform) tools for .h conversion now.

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


[Issue 6292] HTOD hides constants behind a comment

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6292


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
06:04:09 PDT ---
We have better (cross-platform) tools for .h conversion, not gonna wait for
Walter.

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


[Issue 8936] Throwing results in searching the whole directory tree rooted in current directory

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8936


Alex R�nne Petersen a...@lycus.org changed:

   What|Removed |Added

 CC||a...@lycus.org


--- Comment #1 from Alex R�nne Petersen a...@lycus.org 2012-11-02 15:13:50 
CET ---
I don't have a Windows machine available. Do you know where in druntime this
search is being triggered?

This is...kind of bad.

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


[Issue 8546] std.array.overlap missing from ddoc

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8546



--- Comment #1 from github-bugzi...@puremagic.com 2012-11-02 07:14:05 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/f7f8a1fc5c9cf2087a4d55b2c6b0a97b83c6cde3
Merge pull request #919 from AndrejMitrovic/Fix8546

[trivial] Fixes Issue 8546 - missing asterisk in ddoc.

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


[Issue 8546] std.array.overlap missing from ddoc

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8546


Alex R�nne Petersen a...@lycus.org changed:

   What|Removed |Added

 CC||a...@lycus.org


--- Comment #2 from Alex R�nne Petersen a...@lycus.org 2012-11-02 15:14:32 
CET ---
Do we close this?

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


[Issue 8936] New: Throwing results in searching the whole directory tree rooted in current directory

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8936

   Summary: Throwing results in searching the whole directory tree
rooted in current directory
   Product: D
   Version: D2
  Platform: All
OS/Version: Windows
Status: NEW
  Severity: regression
  Priority: P1
 Component: druntime
AssignedTo: nob...@puremagic.com
ReportedBy: verylonglogin@gmail.com


--- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-02 
17:11:54 MSK ---
This is catastrophic Windows druntime issue.

Triggering code:
---
void main()
{
throw new Exception(Ex); // or Error, or any Throwable
// try throw new Exception(Ex); catch { } // same here
}
---

Want something really long? Lunch this on Windows:
---
import std.file;

void main()
{
chdir(`C:\`);
try
// Let's serach the whole C: drive!
throw new Exception(Ex);
catch { }
}
---

Since dmd 2.060.

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


[Issue 8936] Throwing results in searching the whole directory tree rooted in current directory

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8936


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
07:18:59 PDT ---
My best bet is that new dbghelp.dll code which tries to find dbghelp.dll is
causing the search.

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


[Issue 8546] std.array.overlap missing from ddoc

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8546


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


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


[Issue 8937] New: import declaration statement without scope after `if` imports to a parent scope

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8937

   Summary: import declaration statement without scope after `if`
imports to a parent scope
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: verylonglogin@gmail.com


--- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-02 
17:23:59 MSK ---
---
void main()
{
{
static assert(!__traits(compiles, cos(0)));
if(false)
{
static assert(!__traits(compiles, cos(0)));
import std.math;
static assert( __traits(compiles, cos(0)));
}
static assert(!__traits(compiles, cos(0)));
if(true) // same for  `if(false) { } else`
import std.math;
static assert(!__traits(compiles, cos(0))); // fails
static assert(!__traits(compiles, cos(0))); // fails
}
static assert(!__traits(compiles, cos(0)));
}
---

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


[Issue 8936] Throwing results in searching the whole directory tree rooted in current directory

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8936



--- Comment #3 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-02 
17:33:05 MSK ---
Call stack (thanks OllyDbg):
---
AddressStack  Procedure / arguments
0012E578   7C90D77A   Includes ntdll.KiFastSystemCallRet
0012E57C   7C80ED62   ntdll.ZwQueryDirectoryFile
0012E888   7C8138B7   kernel32.FindFirstFileExW
0012EB1C   59C7117B   kernel32.FindFirstFileA
0012EB20   0012EE90 FileName = .\D\dmd2.055\html\d\*.*
0012EB24   0012EC4C pFindFileData = 0012EC4C
0012EF9C   59C71636   dbghelp.59C7109F
0012F110   59C717C6   ? dbghelp.59C7149F
0012F15C   59C71839   ? dbghelp.59C716F4
0012F17C   59C7B424   ? dbghelp.FindExecutableImageEx
0012F1C0   59C816F7   ? dbghelp.59C7B2D1
0012F32C   59C820BF   dbghelp.59C81652
0012F33C   59C82109   dbghelp.59C82061
0012F37C   59C75332   ? dbghelp.59C820D5
0012F3B0   59C84B93   dbghelp.59C75309
0012F408   59C84CC4   dbghelp.59C84B53
0012F4B4   59C8530F   dbghelp.59C84C5E
0012F4DC   59C8356D   dbghelp.59C852DF
0012F514   00421AF0   Includes dbghelp.59C8356D
0012FDA4   004219B3   test_d2.00421A0C
0012FDD0   0042178D   test_d2.00421974
0012FDDC   004171F4   test_d2.00421778
0012FDEC   0041A546   test_d2.004171E0
0012FDF0   00410CEC   test_d2.0041A530
0012FE08   0040B9FD   test_d2.00410CC4
0012FE18   004082D4   test_d2.0040B9F0
0012FE20   00402082   test_d2.004082C8
0012FE54   0040823A   test_d2.00402010
0012FE68   00407EBC   test_d2.00408228
0012FE98   0040827D   test_d2.00407E54
0012FEAC   00407EBC   test_d2.00408248
0012FEDC   00407E40   test_d2.00407E54
0012FF84   00435311   test_d2.00407BF4
0012FF88   0001 Arg1 = 0001
0012FF8C   009303C4 Arg2 = 009303C4
0012FF90   00930400 Arg3 = 00930400
0012FF94    Arg4 = 
0012FFC4   7C817077   Includes test_d2.00435311
---

`FileName` goes through the whole disk.

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


[Issue 8938] New: static struct initializer allows to not explicitly initialize members with disabled constructor

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8938

   Summary: static struct initializer allows to not explicitly
initialize members with disabled constructor
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: accepts-invalid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: verylonglogin@gmail.com


--- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-02 
17:46:46 MSK ---
Current behavior:
---
struct S0 { @disable this(); }
struct S  { int i; S0 s0; }

static assert(!__traits(compiles, { S0 s; }));
static assert(!__traits(compiles, { S0 s = S0(); }));
static assert( __traits(compiles, { S0 s = S0.init; }));
static assert(!__traits(compiles, {
struct S1 { S0 s0; this(int) { } }
}));

static assert(!__traits(compiles, { S s; }));
static assert( __traits(compiles, { S s = S(5, S0.init); }));
static assert(!__traits(compiles, { S s = S(); })); // assert failure
static assert(!__traits(compiles, { S s = S(5); }));// assert failure
static assert(!__traits(compiles, { S x = { }; })); // assert failure
static assert(!__traits(compiles, { S x = { i:1 }; })); // assert failure
---


It looks inconsistent because this is disabled:
---
struct S1 {
int i;
S0 s0;

// Error: constructor main.S1.this field s0 must be initialized in
constructor
this(int i) { this.i = i; }
}
---

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


[Issue 8939] New: ICE on passing by ref statically initialized const/immutable variable

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8939

   Summary: ICE on passing by ref statically initialized
const/immutable variable
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice, rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: verylonglogin@gmail.com


--- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-02 
17:56:39 MSK ---
---
void f(T)(ref T) { } // same for `auto ref`

const n = 1; // or `immutable`

void main()
{
f(n); // main.d(8): Error: constant 1 is not an lvalue
// And ICE: Assertion failure: '0' on line 1224 in file 'glue.c'
}
---

The bad thing is that it breaks `auto ref` too with same (incorrect now) not
an lvalue error before ICE.

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


[Issue 8940] New: Able to modify const/immutable with passing to a templated function by `ref`

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8940

   Summary: Able to modify const/immutable with passing to a
templated function by `ref`
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: accepts-invalid
  Severity: major
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: verylonglogin@gmail.com


--- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-02 
18:17:31 MSK ---
---
const int n; // or `immutable`
static this() { n = 3; }

void f(T)(ref int val)
{
assert(val == 3);
++val;
}

static assert(!__traits(compiles,  f!void(n))); // fails
---

As a result of the fact `f!void(n)` compiles:
---
void main()
{
assert(n == 3);
f!void(n);
assert(n == 3); // may pass as compiler caches comparison result
assert(n != 4); // may pass but likely will fail
}
---

This also leads to ability to modify const/immutable data accidentally because
of incorrect overload selection:
---
void g(A...)(A args) { }
void g(A...)(ref A args) { assert(0); }

void main()
{
g(1); // ok
g(n); // triggers `assert(0)`
}
---

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


[Issue 8940] Able to modify const/immutable with passing to a templated function by `ref`

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8940



--- Comment #1 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-02 
18:22:48 MSK ---
May be connected with
Issue 8939 - ICE on passing by ref statically initialized const/immutable
variable

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


[Issue 8939] ICE on passing by ref statically initialized const/immutable variable

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8939



--- Comment #1 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-02 
18:23:10 MSK ---
May be connected with
Issue 8940 - Able to modify const/immutable with passing to a templated
function by `ref`

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


[Issue 8941] New: Documentation for the Yes struct in Phobos std.typecons appears incorrect

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8941

   Summary: Documentation for the Yes struct in Phobos
std.typecons appears incorrect
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: trivial
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: p.summerl...@gmail.com


--- Comment #0 from Peter Summerland p.summerl...@gmail.com 2012-11-02 
08:37:57 PDT ---
The docs say:

Convenience names that allow using e.g. yes!encryption instead 
of Flag!encryption.yes and no!encryption instead of 
Flag!encryption.no.

I could not get yes!encription to work. 

But Yes.encryption does work. Should the docs say Yes.encryption?

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


[Issue 8942] New: `alias qualifier type` ignores qualifier in foreach over tuple

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8942

   Summary: `alias qualifier type` ignores qualifier in
foreach over tuple
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: verylonglogin@gmail.com


--- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-02 
18:39:32 MSK ---
Qualifier is ignored in foreach over tuple if there is no parantheses:
---
alias const int A0;
static assert(is(A0 == const int)); // passes

void main()
{
alias const int A1;
static assert(is(A1 == const int)); // passes

static struct S { int i; }
foreach(Unused; typeof(S.tupleof))
{
alias const(int) A2_;
static assert(is(A2_ == const int)); // also passes

alias const int A2;
static assert(is(A2 == const int)); // fails
// Error: static assert  (is(int == const(int))) is false
}
}
---

As always, such (unexpected) template bugs are hard to figure out.

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


[Issue 8943] New: Cannot get parent of an overload

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8943

   Summary: Cannot get parent of an overload
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: samu...@voliacable.com


--- Comment #0 from Max Samukha samu...@voliacable.com 2012-11-02 09:08:42 
PDT ---
struct S
{
void foo();
}

// Just to be able to alias __traits 
template AliasTuple(A...)
{
alias A AliasTuple;
}

alias AliasTuple!(__traits(getOverloads, S, foo)) Overloads;
alias AliasTuple!(__traits(parent, Overloads[0])) P; // fail
static assert(is(P[0] == S));

Error: argument foo has no parent

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


[Issue 8944] New: Loosing const from shared const type when unqualifying in foreach over tuple

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8944

   Summary: Loosing const from shared const type when unqualifying
in foreach over tuple
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: major
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: verylonglogin@gmail.com


--- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-02 
20:34:54 MSK ---
---
template TypeTuple(TList...)
{ alias TList TypeTuple; }

void main()
{
foreach(T; TypeTuple!(shared void*, const shared void*))
{
static  if (is(T U == shared const U)) alias U TU;
else static if (is(T U == shared   U)) alias U TU;
else static assert(0);

pragma(msg, T:  , T, \nTU: , TU, \n);

static if(is(T P == P*))
static if(is(TU PU == PU*))
static assert(is(P == PU)); // fails on second iteration

T t;
bool b = is(typeof(cast(TU*) t = null)); // comment to hide a bug
}
}
---

Output:
---
T:  shared(void*)
TU: shared(void)*

T:  shared(const(void*))
TU: shared(void)*

main.d(16): Error: static assert  (is(shared(const(void)) == shared(void))) is
false
---
Second `TU` should be `shared(const(void))*`.

As always, such (unexpected) template bugs are hard to figure out.

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


[Issue 8945] New: Can't call static struct initializer or constructor without qualifier for templated inner struct

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8945

   Summary: Can't call static struct initializer or constructor
without qualifier for templated inner struct
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: verylonglogin@gmail.com


--- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-02 
21:01:28 MSK ---
---
struct S // or `class`, or `union`
{
struct S0(T) { int i; }
struct S1(T) { this(int){} }
}

void main()
{
auto cs01 = const S.S0!int();  // ok
auto cs02 = const S.S0!int(1); // ok
auto cs1  = const S.S1!int(1); // ok

auto s01 = S.S0!int();  // Error: struct S0 does not overload ()
auto s02 = S.S0!int(1); // Error: struct S0 does not overload ()
auto s1  = S.S1!int(1); // Error: struct S1 does not overload ()
}
---

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


[Issue 198] DDoc: superclass/interface decl expansion

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=198


Jacob Carlborg d...@me.com changed:

   What|Removed |Added

 CC||d...@me.com


--- Comment #2 from Jacob Carlborg d...@me.com 2012-11-02 11:03:34 PDT ---
I think this would be very useful.

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


[Issue 8945] Can't call static struct initializer or constructor without qualifier for templated inner struct

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8945


Denis Shelomovskij verylonglogin@gmail.com changed:

   What|Removed |Added

   Severity|normal  |minor


--- Comment #1 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-02 
21:04:45 MSK ---
An easy workaround:
---
auto s01 = S.S0!int.init;
auto s02 = cast(S.S0!int) 1;
auto s1  = cast(S.S1!int) 1;
---

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


[Issue 8946] New: « any » function does not what it should do

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8946

   Summary: « any » function does not what it should do
   Product: D
   Version: future
  Platform: All
OS/Version: All
Status: NEW
  Severity: major
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: dimitri.saba...@gmail.com


--- Comment #0 from Dimitri Sabadie dimitri.saba...@gmail.com 2012-11-02 
11:07:46 PDT ---
The any function calls find, which is really weird implemented because it
returns a subrange, doing (re)allocation(s) on the fly. I think it’s way too
much for just applying a predicate on a range. That’s why I have rewritten any
as it would be (a simple loop and apply the predicate), and I’d propose a patch
here for the std one.

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


[Issue 8947] New: redBlackTree() of fixed size arrays

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8947

   Summary: redBlackTree() of fixed size arrays
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: accepts-invalid, rejects-valid
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-11-02 12:40:52 PDT ---
I think redBlackTree() has problems with fixed size arrays:


import std.container: redBlackTree, RedBlackTree;
void main() {
int[2] a;
auto t1 = new RedBlackTree!(typeof(a));
t1.stableInsert(a); // OK
auto t2 = redBlackTree(a);
t2.stableInsert(a); // Error
t2.stableInsert(1); // No error, but it's wrong
}



DMD 2.061alpha gives:

test.d(7): Error: template
std.container.RedBlackTree!(int).RedBlackTree.stableInsert does not match any
function template declaration
...\dmd2\src\phobos\std\container.d(5834): Error: template
std.container.RedBlackTree!(int).RedBlackTree.stableInsert cannot deduce
template function from argument types !()(int[2u])

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


[Issue 8948] New: Make error message more readable when assigning function pointers

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8948

   Summary: Make error message more readable when assigning
function pointers
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: pull
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: andrej.mitrov...@gmail.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-02 
13:22:39 PDT ---
void main()
{
void function() a;
void function(int) b;
b = a;
}

Before:
test.d(7): Error: cannot implicitly convert expression (a) of type void
function(int, float, string) to void function(float, int, string)

After:
test.d(7): Error: cannot implicitly convert expression (a) of type
  void function(int, float, string) 
to 
  void function(float, int, string)

This will make it easier to figure out why the types don't match.

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


[Issue 4090] No foreach type inference with const, ref etc modifiers

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4090



--- Comment #8 from Kenji Hara k.hara...@gmail.com 2012-11-02 20:26:26 PDT ---
Posted an additional pull request:
https://github.com/D-Programming-Language/dmd/pull/1249

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


[Issue 8945] Can't call static struct initializer or constructor without qualifier for templated inner struct

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8945


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

   What|Removed |Added

   Keywords||pull


--- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-11-02 21:04:09 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1250

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


[Issue 8949] New: [CTFE] Internal Compiler Error

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8949

   Summary: [CTFE] Internal Compiler Error
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: zan77...@nifty.com


--- Comment #0 from SHOO zan77...@nifty.com 2012-11-02 21:07:40 PDT ---
This code doesn't work:

string test()
{
import std.csv;
static struct Layout  { string a, b; }
static struct MapData { string[string] map; }
MapData md;
foreach (data; csvReader!Layout(a,))
{
md.map[data.a] = data.b;
}
return md.map.get(b, null);
}

void main()
{
//import std.stdio;
//writeln(test()); // - OK
pragma(msg, test());   // - NG
}

Result:
main.d(9): Error: Internal Compiler Error: CTFE literal Layout(['a'],null).b
Assertion failure: '0' on line 353 in file 'ctfeexpr.c'

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


[Issue 6214] Don't influence foreach iteration on range

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6214


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-11-02 21:12:30 PDT ---
(In reply to comment #0)
 import std.stdio;
 void main() {
 foreach (i; 0 .. 10) {
 i += 1;
 write(i,  );
 }
 }
 
 The output:
 1 3 5 7 9 
 
 In my opinion this is a bit bug-prone because in real code there is some risk
 of modifying the iteration variable i by mistake. (Note: here I am not
 talking about D for() loops. They are OK, their semantics is transparent
 enough. foreach() loops are less transparent and they *look* higher level than
 for() loops). I'd like the iteration variable to act as being a copy of the
 true loop variable as in Python. If this is a bit bad for foreach performance,
 then I'd like the compiler to forbid the mutation of the foreach iteration
 variable inside the foreach body.

This is now progressing by fixing bug 6652. So I'll mark this as a dup of it.


 Currently you can't solve the problem adding a const(int) to the iteration
 variable:
 
 import std.stdio;
 void main() {
 foreach (const(int) i; 0 .. 10) { // line 3
 write(i,  );
 }
 }
 
 DMD 2.053 gives:
 test.d(3): Error: variable test.main.i cannot modify const

This is a dup of bug 4090, and it is mostly fixed in 2.061head.

*** This issue has been marked as a duplicate of issue 6652 ***

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


[Issue 6652] foreach parameter with number range is always ref

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6652



--- Comment #23 from Kenji Hara k.hara...@gmail.com 2012-11-02 21:12:30 PDT 
---
*** Issue 6214 has been marked as a duplicate of this issue. ***

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


[Issue 8943] Cannot get parent of an overload

2012-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8943


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

   What|Removed |Added

   Keywords||pull, wrong-code


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-11-02 21:20:30 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1251

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