[Issue 9700] std.typecons.Proxy with invaliant and in-place operation causes Access Violation

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9700


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

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-03-12 23:21:41 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1742

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


[Issue 9599] File.byLine doesn't function properly with take

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9599


monarchdo...@gmail.com changed:

   What|Removed |Added

 AssignedTo|nob...@puremagic.com|monarchdo...@gmail.com


--- Comment #3 from monarchdo...@gmail.com 2013-03-13 00:20:19 PDT ---
(In reply to comment #1)
 Ideally, byLine should be reworked to be a little more lazy, and better
 preserve the integrity of its underlying stream:
 - front means do NOT modify the referenced container
 - pop means remove the CURRENT element, and stop there

Either that, or take the

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


[Issue 9700] std.typecons.Proxy with invaliant and in-place operation causes Access Violation

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9700


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 5091] main runs after unittests

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5091


Martin Nowak c...@dawg.eu changed:

   What|Removed |Added

 CC||c...@dawg.eu


--- Comment #7 from Martin Nowak c...@dawg.eu 2013-03-13 07:10:31 PDT ---
It's a little hacky though, because returning false is interpreted as failed
tests.

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


[Issue 8735] Can't use alias this on template + ICE: Assertion failure: 't' on line 100 in file 'aliasthis.c'

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8735


monarchdo...@gmail.com changed:

   What|Removed |Added

 CC||monarchdo...@gmail.com


--- Comment #1 from monarchdo...@gmail.com 2013-03-13 09:11:26 PDT ---
Stumbled upon this, with (I think) a simple reduced case:

//
struct S(alias Arg)
{
alias Arg Val;
alias Val this;
}
alias S!1 S1;
//

Assertion failure: 't' on line 100 in file 'aliasthis.c'
abnormal program termination

The code is not legal (AFAIK), but ICE none the less.

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


[Issue 9709] New: ice with template and alias this

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9709

   Summary: ice with template and alias this
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: zh...@list.ru


--- Comment #0 from Zhenya Chapovsky zh...@list.ru 2013-03-13 10:20:03 PDT ---
This code fails with message dmd: aliasthis.c:100: virtual void
AliasThis::semantic(Scope*): Assertion `t' failed.

import std.stdio;

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

template Foo(alias A,alias B)
{
static assert(is(A == Tuple!(1,int,foo)));
static assert(is(B == Tuple!(2,double,bar)));
static int dummy = 0;
}

void main()
{
alias Tuple!(1,int,foo) A;
alias Tuple!(2,double,bar) B;
writeln(Foo!(A,B).dummy);
}

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


[Issue 8735] Can't use alias this on template + ICE: Assertion failure: 't' on line 100 in file 'aliasthis.c'

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8735


Zhenya Chapovsky zh...@list.ru changed:

   What|Removed |Added

 CC||zh...@list.ru


--- Comment #2 from Zhenya Chapovsky zh...@list.ru 2013-03-13 10:42:07 PDT ---
*** Issue 9709 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 9709] ice with template and alias this

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9709


Zhenya Chapovsky zh...@list.ru changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #1 from Zhenya Chapovsky zh...@list.ru 2013-03-13 10:42:07 PDT ---
*** This issue has been marked as a duplicate of issue 8735 ***

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


[Issue 5091] main runs after unittests

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5091



--- Comment #8 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-03-13 
12:17:24 PDT ---
(In reply to comment #7)
 It's a little hacky though, because returning false is interpreted as failed
 tests.

Yeah, I've realized that after posting. Currently I use getOpt and a --runMain
switch in my own code.

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


[Issue 9710] New: Pointer enums crash dmd

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9710

   Summary: Pointer enums crash dmd
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: ncras...@gmail.com


--- Comment #0 from ncras...@gmail.com 2013-03-13 13:01:08 PDT ---
Reveals while porting old C library, below code crashes dmd v2.062 without any
error reported:

long gi;
enum gi0 = ((cast(int *)gi)[0]);
enum gi1 = ((cast(int *)gi)[1]);

void main()
{

}

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


[Issue 9710] Pointer enums crash dmd

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9710



--- Comment #1 from ncras...@gmail.com 2013-03-13 13:05:45 PDT ---
Appears only at Windows.

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


[Issue 9710] Pointer enums crash dmd

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9710


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #2 from bearophile_h...@eml.cc 2013-03-13 13:08:00 PDT ---
If you port C code them maybe you want to write:


__gshared long gi;

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


[Issue 9711] New: extend IFTI to deduce static array length

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9711

   Summary: extend IFTI to deduce static array length
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2013-03-13 15:08:02 PDT ---
IFTI can deduce both the value and key types for associative arrays:

auto deduceKeyAndVal(T,S)(T[S] a){ return a; }
static assert(is(typeof(deduceKeyAndVal([1:1,2:2,3:3]))==int[string]));


It would be nice if it could also deduce static array lengths:

auto deduceLength(T,size_t n)(T[n] a){ return a; }
static assert(is(typeof(deduceLength([1,2,3]))==int[3]));

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


[Issue 9712] New: IFTI does not support static arrays

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9712

   Summary: IFTI does not support static arrays
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2013-03-13 15:13:27 PDT ---
With DMD 2.062, the following code fails to compile:

auto func(T)(T[2] arg){ return arg; }
static assert(is(typeof(func([1,2]))==int[2]));

The code should compile.

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


[Issue 9711] extend IFTI to deduce static array length

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9711


Zhenya Chapovsky zh...@list.ru changed:

   What|Removed |Added

 CC||zh...@list.ru


--- Comment #1 from Zhenya Chapovsky zh...@list.ru 2013-03-13 15:16:45 PDT ---
[1,2,3] seems is dynamic allocated array,so typeof([1,2,3]) == int[]

but

auto deduceLength(T,size_t n)(T[n] a){ return a; }
enum int[3] a = [1,2,3];
static assert(is(typeof(deduceLength(a))==int[3])); // pass

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


[Issue 9712] IFTI does not support deducing static array types from array literal arguments

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9712


timon.g...@gmx.ch changed:

   What|Removed |Added

Summary|IFTI does not support   |IFTI does not support
   |deducing static array   |deducing static array types
   |element types from array|from array literal
   |literal arguments   |arguments


--- Comment #1 from timon.g...@gmx.ch 2013-03-13 15:23:10 PDT ---
Second test case:

auto deduceLength(T,size_t n)(T[n] a){ return a; }
static assert(is(typeof(deduceLength([1,2,3]))==int[3]));

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


[Issue 9711] extend IFTI to deduce static array length

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9711


timon.g...@gmx.ch changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #2 from timon.g...@gmx.ch 2013-03-13 15:25:17 PDT ---
[1,2,3] is supposed to be a polysemous array literal. I mis-guessed the cause
of this, merging into issue 9712.

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

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


[Issue 9712] IFTI does not support deducing static array types from array literal arguments

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9712



--- Comment #2 from timon.g...@gmx.ch 2013-03-13 15:25:17 PDT ---
*** Issue 9711 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 9712] IFTI does not support deducing static array types from array literal arguments

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9712


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

   What|Removed |Added

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


--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-03-13 
15:46:29 PDT ---
This would complement Issue 3652 nicely, which has a partial implementation for
the upcoming 2.063.

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


[Issue 5091] main runs after unittests

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5091



--- Comment #9 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-03-13 
16:27:36 PDT ---
(In reply to comment #7)
 It's a little hacky though, because returning false is interpreted as failed
 tests.

Perhaps we could change ModuleUnitTester to return an int instead of a bool.
Then 0 would mean tests failed, 1 would mean continue execution to main, and a
new return (say 2) would mean don't execute main().

runModuleUnitTests would also have to return this status code, and then in
dmain2.d we'd change:

if (runModuleUnitTests())

to:

if (runModuleUnitTests() == 1)

Of course it might be best to use an enumeration for this:

TestStatus
{
Fail, Ok, SkipMain
}

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


[Issue 9712] IFTI does not support deducing static array types from array literal arguments

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9712


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

   What|Removed |Added

   Keywords||pull, rejects-valid


--- Comment #4 from Kenji Hara k.hara...@gmail.com 2013-03-13 19:08:45 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1744

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


[Issue 5091] main runs after unittests

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5091



--- Comment #10 from Martin Nowak c...@dawg.eu 2013-03-13 20:42:41 PDT ---
This always confused me a little because the documentation is inconsistent.
http://dlang.org/phobos/core_runtime.html#moduleUnitTester
http://dlang.org/phobos/core_runtime.html#runModuleUnitTests
One could also require that test failure is indicated by an exception.

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


[Issue 5091] main runs after unittests

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5091



--- Comment #11 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-03-13 
20:49:45 PDT ---
(In reply to comment #10)
 This always confused me a little because the documentation is inconsistent.
 http://dlang.org/phobos/core_runtime.html#moduleUnitTester
 http://dlang.org/phobos/core_runtime.html#runModuleUnitTests

Yes me too.

 One could also require that test failure is indicated by an exception.

Speaking of which I just noticed that `runAll` doesn't wrap
`runModuleUnitTests()` in a try/catch. That seems like a bug to me.

rt_init does however.

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


[Issue 5091] main runs after unittests

2013-03-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5091



--- Comment #12 from Martin Nowak c...@dawg.eu 2013-03-13 21:58:50 PDT ---
(In reply to comment #11)
 Speaking of which I just noticed that `runAll` doesn't wrap
 `runModuleUnitTests()` in a try/catch. That seems like a bug to me.
 
It does
https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dmain2.d#L613.

tryExec(runAll);

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