[Issue 9891] Ability to modify immutable using default value of ref/out parameter

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9891

Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #2 from Kenji Hara  ---
https://github.com/D-Programming-Language/dmd/pull/5056

--


[Issue 15027] New: cannot pass arguments of type DirEntry to std.file functions

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15027

  Issue ID: 15027
   Summary: cannot pass arguments of type DirEntry to std.file
functions
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Keywords: rejects-valid
  Severity: regression
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: r.sagita...@gmx.de

On git-head, this loop no longer compiles:

import std.file;

string foo()
{
foreach(f; dirEntries("/", "*", SpanMode.shallow, false))
if(std.file.isDir(f))
return f;
return null;
}

>dmd -c test.d
test.d(8): Error: template std.file.isDir cannot deduce function from argument
types !()(DirEntry), candidates are:
c:\s\d\rainers\phobos\std\file.d(1399):std.file.isDir(R)(R name) if
(isInputRange!R && isSomeChar!(ElementEncodingType!R))

compiling with dmd-2.068.1 is ok.

The problem seems to be that the rangified file functions no longer accept
arguments that alias this to strings.

--


[Issue 15028] New: Weird disassembly on asm.dlang.org

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15028

  Issue ID: 15028
   Summary: Weird disassembly on asm.dlang.org
   Product: D
   Version: D2
  Hardware: All
   URL: http://asm.dlang.org/
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dlang.org
  Assignee: nob...@puremagic.com
  Reporter: dfj1es...@sneakemail.com

Code
---
void f()
{
  const char* c="a";
  g(c);
}

extern void g(in char* s);
---

Gives disassembler output
---
void example.f():
push   rbp
movrbp,rsp
movedi,0x0
call   e 
poprbp
ret
---

The function is called with null argument?

--


[Issue 15030] New: [Reg 2.068.1] ICE with recursive delegate, -unittest, and std.range

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15030

  Issue ID: 15030
   Summary: [Reg 2.068.1] ICE with recursive delegate, -unittest,
and std.range
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Keywords: ice
  Severity: regression
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: c...@dawg.eu

cat > modA.d << CODE
import std.range;
CODE

cat > modB.d << CODE
unittest
{
import std.algorithm;
import std.range;

auto dg = (int[] delegate(int[]) self) =>
(int[] arr) => arr ? self(arr.filter!(a => a).array) : null;
}
CODE

dmd -unittest -c modA.d modB.d


dmd: glue.c:1060: void FuncDeclaration_toObjFile(FuncDeclaration*, bool):
Assertion `!v->csym' failed.


--


[Issue 15030] [Reg 2.068.1] ICE with recursive delegate, -unittest, and std.range

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15030

--- Comment #1 from Martin Nowak  ---
Digger points this back to
https://github.com/D-Programming-Language/dmd/pull/4944.

--


[Issue 15021] [REG2.068.1] linker error with speculative instantiation and -inline

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15021

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

   What|Removed |Added

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

--


[Issue 15021] [REG2.068.1] linker error with speculative instantiation and -inline

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15021

--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to stable at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/61f79a8aa18a2d551cfeb7c1bc218ebc3f21cfc6
fix Issue 15021 - linker error with speculative instantiation and -inline

https://github.com/D-Programming-Language/dmd/commit/334e29178254ef0f02639b595a75f906e1b357ee
Merge pull request #5055 from 9rnsr/fix15021

[REG2.068.1] Issue 15021 - linker error with speculative instantiation and
-inline

--


[Issue 15029] [Reg 2.068.0] _postblitRecurse invokes opDispatch with __xpostblit (breaks emplace)

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15029

--- Comment #1 from Martin Nowak  ---
(In reply to Martin Nowak from comment #0)
> but `__traits(hasMember, S, "__xpostblit")` should have instantiated 
> opDispatch
> anyhow.

`__traits(hasMember, S, "__xpostblit")` should NOT instantiate opDispatch and
return false.

--


[Issue 15031] New: rdmd should force rebuild when --compiler changes

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15031

  Issue ID: 15031
   Summary: rdmd should force rebuild when --compiler changes
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: tools
  Assignee: nob...@puremagic.com
  Reporter: l...@luismarques.eu

$ cat test.d
version(LDC) static assert(false, "oops");
void main() {}

$ rdmd --compiler=dmd test.d 
$ rdmd --compiler=ldc2 test.d 
$ touch test.d
$ rdmd --compiler=ldc2 test.d 
test.d(1): Error: static assert  "oops"
Failed: ["ldc2", "-v", "-o-", "test.d", "-I."]

--


[Issue 15032] New: [REG2.068.1] coverage output is discreted around the calls to map(), canFind(), filter()

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15032

  Issue ID: 15032
   Summary: [REG2.068.1] coverage output is discreted around the
calls to map(), canFind(), filter()
   Product: D
   Version: D2
  Hardware: x86_64
OS: Windows
Status: NEW
  Severity: regression
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: j...@red.email.ne.jp

This is a 2.068.1 issue, not 2.068.0.

The coverage counts for the lines are ommited,
around some range operations holding lambdas.

Image:
   |bool isParentOf(in Symbol p, in Symbol sym, in Scope scx ) {
   |if (!p.hasBaseClass)
   |return false;
   |if (!sym)
   |return false;
   |auto names = sym.baseClasses;
000|if (names.canFind!((a,b)=>a==b)(p.name))
   |return true;
   |auto list = names.map!toAggrSym;
000|if (list.canFind!((n, p)=>isParentOf(p, n.s, n.scx))(p))
   |return true;
   |return false;
   |}

--


[Issue 14991] dmd doesn't build under OSX 32 bit

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14991

--- Comment #2 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/591c1f865672c78a8d99b19642f8caaf8af0da63
fix Issue 14991 - dmd doesn't build under OSX 32 bit

https://github.com/D-Programming-Language/dmd/commit/d90bcfb6c61bc315827a25d7de05110fdba31c79
Merge pull request #5016 from WalterBright/fix14991

[Reg] fix Issue 14991 - dmd doesn't build under OSX 32 bit

--


[Issue 15032] [REG2.068.1] coverage output is discreted around the calls to map(), canFind(), filter()

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15032

--- Comment #1 from j...@red.email.ne.jp ---
A reduced test case:

[command]
dmd -cov mod_a.d mod_b.d

[mod_a.d]
import std.string;

[mod_b.d]
import std.algorithm;

void main() { 
int[] range; // this line should be counted
 // but suppressed by this bug 
// canFind, map, filter, and so on
range.canFind!((a,b)=>true)(0); // this line is counted(but wrong?)
}

[Output(mod_b.lst)]
...snipped...
   |int[] range; // this line should be counted
   | // but suppressed by this bug 
   |// canFind, map, filter, and so on
000|range.canFind!((a,b)=>true)(0); // this line is counted(but wrong?)
...snipped...

Note:
The order of mod_a.d and mod_b.d affects.

--


[Issue 15030] [Reg 2.068.1] ICE with recursive delegate, -unittest, and std.range

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15030

Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull
   Hardware|x86_64  |All
 OS|Linux   |All

--- Comment #2 from Kenji Hara  ---
https://github.com/D-Programming-Language/dmd/pull/5058

--


[Issue 15030] [REG2.068.1] ICE with recursive delegate, -unittest, and std.range

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15030

Kenji Hara  changed:

   What|Removed |Added

Summary|[Reg 2.068.1] ICE with  |[REG2.068.1] ICE with
   |recursive delegate, |recursive delegate,
   |-unittest, and std.range|-unittest, and std.range

--


[Issue 15029] [Reg 2.069.0-devel] _postblitRecurse invokes opDispatch with __xpostblit (breaks emplace)

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15029

Martin Nowak  changed:

   What|Removed |Added

Summary|[Reg 2.068.0]   |[Reg 2.069.0-devel]
   |_postblitRecurse invokes|_postblitRecurse invokes
   |opDispatch with __xpostblit |opDispatch with __xpostblit
   |(breaks emplace)|(breaks emplace)

--


[Issue 15029] New: [Reg 2.068.0] _postblitRecurse invokes opDispatch with __xpostblit (breaks emplace)

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15029

  Issue ID: 15029
   Summary: [Reg 2.068.0] _postblitRecurse invokes opDispatch with
__xpostblit (breaks emplace)
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: regression
  Priority: P1
 Component: druntime
  Assignee: nob...@puremagic.com
  Reporter: c...@dawg.eu

See https://github.com/D-Programming-Language/dub/issues/667.

~/dub$ ./build.sh
Generating version file...
Running dmd...
/home/sun/INSTALL/dmd/include/d2/object.d(2329): Error: argument
s.opDispatch!"__xpostblit" has no parent
/home/sun/INSTALL/dmd/include/d2/std/conv.d(4054): Error: template instance
object._postblitRecurse!(Json) error instantiating
/home/sun/INSTALL/dmd/include/d2/std/conv.d(3917):instantiated from
here: emplaceImpl!(Json)
/home/sun/INSTALL/dmd/include/d2/std/array.d(2829):instantiated from
here: emplaceRef!(Json, Json)
/home/sun/INSTALL/dmd/include/d2/std/array.d(135):instantiated from
here: put!(Json)
source/dub/generators/sublimetext.d(39):instantiated from here:
array!(MapResult!(targetFolderJson, Result))
source/dub/generators/sublimetext.d(61): Error: template instance
std.array.array!(MapResult!(Json, string[])) error instantiating
source/dub/generators/sublimetext.d(95): Error: template instance
std.array.array!(Json[]) error instantiating
source/dub/generators/sublimetext.d(99): Error: template instance
std.array.array!(MapResult!(makeBuildSystem, string[])) error instantiating
source/dub/internal/sdlang/lexer.d-mixin-1260(1260): Deprecation: constructor
std.datetime.SysTime.this is deprecated - Please use the overload which takes a
Duration instead of a FracSec.
source/dub/internal/sdlang/lexer.d-mixin-1268(1268): Deprecation: constructor
std.datetime.SysTime.this is deprecated - Please use the overload which takes a
Duration instead of a FracSec.

It fails over `s.opDispatch!"__xpostblit" has no parent` but
`__traits(hasMember, S, "__xpostblit")` should have instantiated opDispatch
anyhow.

--


[Issue 9558] 0b and 0x prefixes for std.string.isNumeric

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9558

hst...@quickfur.ath.cx changed:

   What|Removed |Added

 CC||hst...@quickfur.ath.cx

--- Comment #1 from hst...@quickfur.ath.cx ---
I'm not sure about this. The '0x', '0b', etc., prefixes are syntax defined by
programming languages, whereas isNumeric is intended to check user input.
Presumably, most users wouldn't know what 0x, 0b, etc., are, and may be
surprised to learn that what they consider as invalid input (e.g. 0b10) is
actually accepted by the program, with results that are unexpected to them.

Parsing programming language literals should not be conflated with parsing user
input.

--


[Issue 10407] std.conv.to of lazy range to numbers array

2015-09-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10407

hst...@quickfur.ath.cx changed:

   What|Removed |Added

 CC||hst...@quickfur.ath.cx

--- Comment #1 from hst...@quickfur.ath.cx ---
Is this a real bug? Couldn't you just do `s.map!(a => a.to!real).array` to do
what you want?

--