[Issue 17983] Integer literal should prefer int to char overload

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

--- Comment #3 from Mike  ---
Test here that reproduces there error.  Compiled with dmd-nightly:
https://run.dlang.io/is/nfMGfG

--


[Issue 17983] Integer literal should prefer int to char overload

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

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #2 from Walter Bright  ---
I tried it with HEAD and both orderings, it compiles without complaint.

--


[Issue 17167] dmd fails to write to file or create directory with more than 248 characters in the path

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

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

https://github.com/dlang/dmd/commit/34f6dedb18fd3d9e6aacac8469f6515da2e77928
Fix issue 17167 - handle long filepaths on Windows

https://github.com/dlang/dmd/commit/24ab619f310eed641a60cad492460a0af4e7f0cf
Merge pull request #7299 from kaleidicassociates/fix_issue_17167

Fix issue 17167 - handle long filepaths on Windows
merged-on-behalf-of: Walter Bright 

--


[Issue 17983] Integer literal should prefer int to char overload

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

Mike  changed:

   What|Removed |Added

 CC||slavo5...@yahoo.com

--- Comment #1 from Mike  ---
This doesn't appear to be a cast/conversion or overload problem.  What's
happening is the the compiler is keeping the first alias in lexical order, and
ignoring any other aliases.  i.e. the following works

alias foo = (int i) => 4;   // Notice int overload is first
alias foo = (char c) => 1;

enum int e = 7;
static assert(foo(e) == 4);

The compiler should probably emit an error on the second alias as foo is being
redefined, but it certainly shouldn't just silently ignore it.

--


[Issue 17919] std.container.Array could use pureMalloc

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

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

https://github.com/dlang/phobos/commit/06d738f069a4ade5dfcbfc579865237003839ccd
Fix Issue 17919: Make std.container.Array use pureMalloc

Using pureMalloc like std.typecons.RefCounted does would make it
possible to use std.container.Array in  `pure` code.

https://github.com/dlang/phobos/commit/8e4dfdbd50fbd4a0cadc2bcfa0eae01e4f4ad81e
Merge pull request #5794 from n8sh/container-array-puremalloc

Fix Issue 17919: Make std.container.Array use pureMalloc
merged-on-behalf-of: Andrei Alexandrescu 

--


[Issue 17919] std.container.Array could use pureMalloc

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

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 17983] Integer literal should prefer int to char overload

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

Nick Treleaven  changed:

   What|Removed |Added

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

--


[Issue 9999] Integer literal 0 and 1 should prefer integer type in overload resolution

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

Nick Treleaven  changed:

   What|Removed |Added

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

--


[Issue 17983] New: Integer literal should prefer int to char overload

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

  Issue ID: 17983
   Summary: Integer literal should prefer int to char overload
   Product: D
   Version: D2
  Hardware: x86
OS: Windows
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: n...@geany.org

alias foo = (char c) => 1;
alias foo = (int i) => 4;

enum int e = 7;
static assert(foo(e) == 4); // fails

--


[Issue 9661] LockingTextWriter should increment file handle reference count

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

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

https://github.com/dlang/phobos/commit/cb67c5d50f3898300e2b314f9f8695ba0fe6b850
Fix Issue 9661 - LockingTextWriter should increment file handle reference count

test for locking binary writer

https://github.com/dlang/phobos/commit/99002c366bfd57104e943b74cf28adea0721612d
Merge pull request #5792 from jercaianu/lockingtextwriter

Fix Issue 9661 - LockingTextWriter should increment file handle reference count
merged-on-behalf-of: Andrei Alexandrescu 

--


[Issue 9661] LockingTextWriter should increment file handle reference count

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

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 12064] std.typecons.wrap doesn't handle NVI

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

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 12064] std.typecons.wrap doesn't handle NVI

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

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

https://github.com/dlang/phobos/commit/c9f2158b59a460350e993a2deccad9dbcafc7a51
fix issue 12064 - std.typecons.wrap doesn't handle NVI

https://github.com/dlang/phobos/commit/d1a0a32e7997a15b646bfff81e1514458ae6cf1f
Merge pull request #5858 from BBasile/issue-12064

fix issue 12064 - std.typecons.wrap doesn't handle NVI
merged-on-behalf-of: MetaLang 

--


[Issue 17371] [REG 2.074.0] di generation broken for anonymous classes

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

--- Comment #2 from RazvanN  ---
PR : https://github.com/dlang/dmd/pull/7315

--


[Issue 17371] [REG 2.074.0] di generation broken for anonymous classes

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

RazvanN  changed:

   What|Removed |Added

 CC||razvan.nitu1...@gmail.com

--- Comment #1 from RazvanN  ---
PR that caused it [1] .

The header generation takes into account if a class is anonymous by invoking
the final method Dsymbol.isAnonymous. The specified methods verifies if a
symbol is anonymous by checking if the id is null, but when a class is
instantiated with a null id, it generates one [2] thus scrambling things up. I
think that the easiest way to fix this is to declare a new bool field (isanon)
which is set to true when a null id is passed to the instantiation of a class
declaration and the header generation can check for that field instead of the
wrong isAnonymous method.

PR coming soon.

[1] https://github.com/dlang/dmd/pull/5565
[2]
https://github.com/dlang/dmd/pull/5565/files#diff-ddbaa5e9ca3d5c90a425a9dfafaf1734R225

--


[Issue 17371] [REG 2.074.0] di generation broken for anonymous classes

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

RazvanN  changed:

   What|Removed |Added

   Assignee|nob...@puremagic.com|razvan.nitu1...@gmail.com

--


[Issue 17982] New: Support for const(Class) in algorithm.searching.extremum

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

  Issue ID: 17982
   Summary: Support for const(Class) in
algorithm.searching.extremum
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: normal
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: aurelien.fredouelle+dl...@gmail.com

Initially reported in
https://forum.dlang.org/post/bigzmlszipzpcrpmw...@forum.dlang.org

It is not possible to use minElement on an array of const objects:

class A
{
  int val;
}

const(A) doStuff(const(A)[] v)
{
  import std.algorithm.searching : minElement;
  return v.minElement!"a.val";
}

This gets the following compiler error:

std/algorithm/searching.d(1256,28): Error: cannot implicitly convert expression
(front(r)) of type const(A) to app.A
std/algorithm/searching.d(1286,35): Error: cannot implicitly convert expression
(r[i]) of type const(A) to app.A
std/algorithm/searching.d(1258,36): Error: template instance
std.algorithm.searching.extremum!("a.val", "a < b", const(A)[], A) error
instantiating
std/algorithm/searching.d(3345,24):instantiated from here:
extremum!("a.val", "a < b", const(A)[])
source/app.d(11,11):instantiated from here: minElement!("a.val",
const(A)[])

This seems to be because the extremum helper function is using Unqual!Element
to hold the current extremum, which cannot be assigned to when Element is
const.

In the forum thread, @vit suggested using something like this instead:

template RebindableOrUnqual(T){
static if (is(T == class) || is(T == interface) || isDynamicArray!T ||
isAssociativeArray!T)alias RebindableOrUnqual = Rebindable!T;
else alias RebindableOrUnqual = Unqual!T;
}

--


[Issue 17981] New: DMD Nightly is broken

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

  Issue ID: 17981
   Summary: DMD Nightly is broken
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: basti...@veelo.net

Dmd nightly was last successfully built on November 1. Since then, building
halts with an access violation.
https://nightlies.dlang.org/dmd-master-2017-11-02/build.html

Entering dir: clones\dlang.org
Running: make MODEL=32 DMD=..\dmd\src\dmd
HOST_DC=C:\Users\vagrant\old-dmd\dmd2\windows\bin\dmd.exe RELEASE=1
LATEST=master -f win32.mak chm
..\dmd\src\dmd -g chmgen

..\dmd\src\dmd -run modlist.d ..\druntime ..\phobos --ex=gc. --ex=rt.
--ex=core.internal. --ex=core.stdc.config --ex=core.sys.  --ex=std.c.
--ex=std.algorithm.internal --ex=std.internal. --ex=std.regex.internal. 
--ex=std.typelist --ex=std.windows. --ex=etc.linux.memoryerror  --ex=std.stream
--ex=std.cstream --ex=socketstream  --ex=std.experimental.ndslice.internal
>modlist-release.ddoc
..\dmd\src\dmd -o- -c -Dfchm-nav.json macros.ddoc html.ddoc dlang.org.ddoc
windows.ddoc doc.ddoc std.ddoc spec\spec.ddoc modlist-release.ddoc
changelog\changelog.ddoc chm-nav.dd 

..\dmd\src\dmd -o- -c -D macros.ddoc html.ddoc dlang.org.ddoc windows.ddoc
doc.ddoc  cppcontracts.dd

object.Error@(0): Access Violation

0x006530B6
0x00473974
0x0046AE3D
0x00524FF0
0x005266E6
0x0065B5DF
0x0065B4E0
0x0052A768
0x76AA33CA in BaseThreadInitThunk
0x77199ED2 in RtlInitializeExceptionChain
0x77199EA5 in RtlInitializeExceptionChain

--- errorlevel 1
create_dmd_release: Error: Command failed (ran from dir 'clones\dlang.org'):
make MODEL=32 DMD=..\dmd\src\dmd
HOST_DC=C:\Users\vagrant\old-dmd\dmd2\windows\bin\dmd.exe RELEASE=1
LATEST=master -f win32.mak chm
Entering dir: C:\Users\vagrant
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
object.Exception@build_all.d(78): Enforcement failed

??:? pure @safe void
std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong,
const(char[])) [0x557677]
??:? pure @safe bool std.exception.enforce!(Exception, bool).enforce(bool, lazy
const(char)[], immutable(char)[], ulong) [0x5575f4]
??:? void build_all.Shell.__dtor() [0x543539]
??:? void build_all.Shell.__aggrDtor() [0x543578]
??:? void build_all.runBuild(ref build_all.Box, immutable(char)[], bool, bool)
[0x5450cc]
??:? void build_all.Box.build(immutable(char)[], bool, bool) [0x543dd8]
??:? _Dmain [0x549618]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5992be]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).tryExec(scope void delegate()) [0x599214]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).runAll() [0x59927a]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).tryExec(scope void delegate()) [0x599214]
??:? _d_run_main [0x599171]
??:? main [0x592945]
??:? __libc_start_main [0x1ea9ab14]

--