[Issue 17995] template NoDuplicates(TList...) bug.

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17995

--- Comment #2 from Simen Kjaeraas  ---
PR: https://github.com/dlang/phobos

--


[Issue 17995] template NoDuplicates(TList...) bug.

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17995

Simen Kjaeraas  changed:

   What|Removed |Added

 CC||simen.kja...@gmail.com

--- Comment #1 from Simen Kjaeraas  ---
Example code that demonstrates the behavior:

import std.meta;

alias a = NoDuplicates!(AliasSeq!(1, Repeat!(1000, 3)));
alias b = NoDuplicates!(AliasSeq!(1, Repeat!(10, 3)));

static assert(a.length == b.length);

a is AliasSeq!(3), b is AliasSeq!(1,3).

--


[Issue 17995] New: template NoDuplicates(TList...) bug.

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17995

  Issue ID: 17995
   Summary: template NoDuplicates(TList...) bug.
   Product: D
   Version: D2
  Hardware: x86
OS: Mac OS X
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: sh...@163.com

Phobos version: 2.077.0
file: std/meta.d
line: 486

template NoDuplicates(TList...)
{
   ...
   static if (TList.length > 500)
   {
  enum steps = 16;
  alias first = NoDuplicates!(TList[0 .. steps]);
  alias NoDuplicates = NoDuplicates!(EraseAllN!(first.length, first,
TList[steps..$]));
   }
   ...
}


When processing step by step here, forget to process 'first'.

--


[Issue 11006] Subtraction of pointers for `void` and non-void types compiles

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11006

--- Comment #4 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/1cf383600f21394b12e2077ae97c4944f53c5e2b
Fix Issue 11006 - Subtraction of pointers for void and non-void types compiles

https://github.com/dlang/dmd/commit/523301bf58ac8c2ea68269dc7628812d5697c863
Merge pull request #7332 from JinShil/fix_11006

Fix Issue 11006 - Subtraction of pointers for void and non-void type compiles
merged-on-behalf-of: Walter Bright 

--


[Issue 11006] Subtraction of pointers for `void` and non-void types compiles

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11006

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #3 from Walter Bright  ---
6440 is rebooted as https://github.com/dlang/dmd/pull/7332

--


[Issue 17925] [Contract Programming]

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17925

Basile B.  changed:

   What|Removed |Added

   Keywords||pull
 CC||b2.t...@gmx.com

--- Comment #1 from Basile B.  ---
PR https://github.com/dlang/dlang.org/pull/1929

--


[Issue 17994] [Reg 2.077] Token.isKeyword() segfaults

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17994

Ketmar Dark  changed:

   What|Removed |Added

 CC||ket...@ketmar.no-ip.org

--


[Issue 12116] dmd -op -od broken

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12116

Mike  changed:

   What|Removed |Added

 CC||slavo5...@yahoo.com
   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=3541

--


[Issue 3541] Add -oq to dmd (use fully qualified module name as object filename)

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3541

Mike  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=12116

--


[Issue 17994] New: [Reg 2.077] Token.isKeyword() segfaults

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17994

  Issue ID: 17994
   Summary: [Reg 2.077] Token.isKeyword() segfaults
   Product: D
   Version: D2
  Hardware: x86
OS: Windows
Status: NEW
  Severity: regression
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: c...@dawg.eu

https://github.com/dlang/dmd/blob/9b8eba2787f766e00079810e7a080b989101d8a6/src/ddmd/tokens.d#L879

Seems like the `private immutable TOK[] keywords` array is loaded with a
nullptr and a weird length.
This has broken nightly builds since 2017-11-02
(http://nightlies.dlang.org/dmd-master-2017-11-02/build.html), likely because
2.077.0 got released.
The bug only occurs when compiling dmd with dmd-2.077.0, but not when using
dmd-2.076.1 as host compiler.

0x005D06D9 in Token at C:\Code\D\DPL\dmd\src\ddmd\tokens.d(884)
0x0044E3A4 in highlightCode2 at C:\Code\D\DPL\dmd\src\ddmd\doc.d(2696)
0x0044D70D in highlightText at C:\Code\D\DPL\dmd\src\ddmd\doc.d(2399)
0x00449378 in gendocfile at C:\Code\D\DPL\dmd\src\ddmd\doc.d(433)
0x004BDFA0 in int ddmd.mars.tryMain(uint, const(char)**) at
C:\Code\D\DPL\dmd\sr
c\ddmd\mars.d(788)

--


[Issue 9395] Allow deprecated statement in enum members

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9395

Mike  changed:

   What|Removed |Added

 CC||slavo5...@yahoo.com
   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=15601

--


[Issue 15601] version not allowed within enum declaration

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15601

Mike  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=9395

--


[Issue 9701] UDAs cannot be attached to enum values.

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9701

Mike  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=15601

--


[Issue 15601] version not allowed within enum declaration

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15601

Mike  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=9701

--


[Issue 9701] UDAs cannot be attached to enum values.

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9701

Mike  changed:

   What|Removed |Added

 CC||slavo5...@yahoo.com
   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=9395

--


[Issue 9395] Allow deprecated statement in enum members

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9395

Mike  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=9701

--


[Issue 17993] New: 404 Not Found: phobos/ddmd_utf.html

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17993

  Issue ID: 17993
   Summary: 404 Not Found: phobos/ddmd_utf.html
   Product: D
   Version: D2
  Hardware: All
   URL: http://dlang.org/
OS: All
Status: NEW
  Severity: enhancement
  Priority: P3
 Component: dlang.org
  Assignee: nob...@puremagic.com
  Reporter: mjma...@gmx.de

When I visit the following URL, I get 404 not found:

https://dlang.org/phobos/ddmd_utf.html

--


[Issue 16343] Incorrectly requiring this pointer for a free function

2017-11-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16343

--- Comment #5 from Jonathan M Davis  ---
I just hit this issue again - with an alias parameter this time. This code


struct S
{
int i;
}

void main()
{
foreach(memberName; __traits(allMembers, S))
{
func!(__traits(getMember, S, memberName))();
}
}

void func(alias member)()
{
auto protection = __traits(getProtection, member);
alias Type = typeof(member);
auto name = __traits(identifier, member);
}


gives this error

q.d(10): Error: need 'this' for 'func' of type 'pure nothrow @nogc @safe
void()'

whereas moving the contents of the free function into main works just fine. The
lack of ability to pass the member to a template for introspection makes it a
lot harder to avoid code duplication when writing code that does type
introspection.

--