[Issue 14184] Cannot resolve type for lambda stringof in constructor

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14184

Vlad Levenfeld  changed:

   What|Removed |Added

 CC||vlevenf...@gmail.com

--


[Issue 14298] New: std.typecons.Proxy incorrectly defines opCast operator, that breaks casting to supertype.

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14298

  Issue ID: 14298
   Summary: std.typecons.Proxy incorrectly defines opCast
operator, that breaks casting to supertype.
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: Phobos
  Assignee: nob...@puremagic.com
  Reporter: luk.wrzo...@gmail.com

//test case
import std.typecons;
class IA {}
class IB {}
class C : IB {
  IA a;
  mixin Proxy!a;

  public this() {
a = new IA;
  }
}

void main() {
  C c = new C;
  assert(c !is null);

  IA a = cast(IA)c;
  assert(a !is null);

  IB b_ok = c;
  assert(b_ok !is null); //implicit cast works

  IB b_not_ok = cast(IB)c;
  assert(b_not_ok !is null); //assert fails on explicit cast.
}



//Proxy template always casts to Proxy'ied type:
 auto ref opCast(T, this X)() { return cast(T)a; }

--


[Issue 14297] [2.067-rc1] Broken links in phobos/index.html

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14297

bb.t...@gmx.com changed:

   What|Removed |Added

Summary|[2.067-rc1] Brorken links   |[2.067-rc1] Broken links in
   |in phobos/index.html|phobos/index.html

--- Comment #1 from bb.t...@gmx.com ---
links to :

std.digest.crc
std.digest.digest
std.digest.md
std.digest.ripemd
std.digest.sha
std.concurrency
std.parallelism
std.process
core.atomic
core.sync.barrier
core.sync.condition
core.sync.exception
core.sync.mutex
core.sync.rwmutex
core.sync.semaphore
core.thread
core.sync.semaphore
core.thread
std.functional
std.algorithm
std.signals
std.uni
std.utf
std.ascii
std.windows.charset
core.simd

are broken in local html

--


[Issue 14297] New: [2.067-rc1] Brorken links in phobos/index.html

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14297

  Issue ID: 14297
   Summary: [2.067-rc1] Brorken links in phobos/index.html
   Product: D
   Version: D2
  Hardware: x86
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: Phobos
  Assignee: nob...@puremagic.com
  Reporter: bb.t...@gmx.com

--


[Issue 14296] New: RDMD fails at building a lib when the source is in a subdir

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14296

  Issue ID: 14296
   Summary: RDMD fails at building a lib when the source is in a
subdir
   Product: D
   Version: unspecified
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: regression
  Priority: P1
 Component: tools
  Assignee: nob...@puremagic.com
  Reporter: cbkbbej...@mailinator.com

$ mkdir src
$ touch src/test.d
$ rdmd --build-only -lib src/test.d
std.file.FileException@std/file.d(409): src/test.a: No such file or directory
$ ls src/
src  test.d
$ ls src/src/
test.a.tmp

This used to work with the RDMD packaged in DMD v2.064.2, but fails starting
with RDMD 2.065.0.

--


[Issue 14280] Links to command line tools have disappeared from navigation

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14280

ag0ae...@gmail.com changed:

   What|Removed |Added

   Keywords||pull

--- Comment #2 from ag0ae...@gmail.com ---
https://github.com/D-Programming-Language/dlang.org/pull/929

--


[Issue 4705] std.algorithm.max/min with key function, for a single range, + mins/maxs functions

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4705

--- Comment #23 from bearophile_h...@eml.cc ---
(In reply to Andrei Alexandrescu from comment #22)

> less participation to useless debates + more real contribution = win

You really don't understand my reasons? Please be much less egoistic, and more
gentle with people. I'll not do it.

--


[Issue 4705] std.algorithm.max/min with key function, for a single range, + mins/maxs functions

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4705

--- Comment #22 from Andrei Alexandrescu  ---
(In reply to bearophile_hugs from comment #21)
> (In reply to Andrei Alexandrescu from comment #20)
> > @bearophile why didn't you just implement this as a PR? It's trivial.
> 
> If I also start writing patches for D, it will take too much of my time. It
> will be wonderful for you and D, but awful for my life.

less participation to useless debates + more real contribution = win

--


[Issue 4705] std.algorithm.max/min with key function, for a single range, + mins/maxs functions

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4705

--- Comment #21 from bearophile_h...@eml.cc ---
(In reply to Andrei Alexandrescu from comment #20)
> @bearophile why didn't you just implement this as a PR? It's trivial.

If I also start writing patches for D, it will take too much of my time. It
will be wonderful for you and D, but awful for my life.

--


[Issue 4705] std.algorithm.max/min with key function, for a single range, + mins/maxs functions

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4705

--- Comment #20 from Andrei Alexandrescu  ---
@bearophile why didn't you just implement this as a PR? It's trivial.

--


[Issue 4705] std.algorithm.max/min with key function, for a single range, + mins/maxs functions

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4705

bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||and...@erdani.com

--- Comment #19 from bearophile_h...@eml.cc ---
*** Issue 14293 has been marked as a duplicate of this issue. ***

--


[Issue 14293] min and max with predicate

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14293

bearophile_h...@eml.cc changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bearophile_h...@eml.cc
 Resolution|--- |DUPLICATE

--- Comment #2 from bearophile_h...@eml.cc ---
This is an almost five years old enhancement request of mine.

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

--


[Issue 14280] Links to command line tools have disappeared from navigation

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14280

ag0ae...@gmail.com changed:

   What|Removed |Added

 CC||ag0ae...@gmail.com

--- Comment #1 from ag0ae...@gmail.com ---
The culprit:
https://github.com/D-Programming-Language/dlang.org/commit/e486d39bd071fa00371bc01d55cd9815ee2210b4#diff-7

The scariliy long list of everything that went missing from the menu:

overview.html (removed intentionally?)
http://digitalmars.com/d/1.0/index.html (of questionable value, maybe removed
intentionally)
language-reference.html/spec.html ("Table of Contents" of the language
reference. Not needed as such as the links are all in the menu. But this page
also has links to the PDF/Mobi/Kindle versions.)
articles.html (just a redirect to d-floating-point.html)
SUBNAV_DOWNLOAD:
dmd-linux.html
dmd-windows.html
dmd-osx.html
dmd-freebsd.html
http://gdcproject.org (has a link on download.html)
http://digitalmars.com/ctg/optlink.html (is linked from dmd-windows.html)
http://digitalmars.com/ctg/trace.html (is linked from dmd-*.html)
debugger.html (404)
windbg.html
code_coverage.html (is linked from dmd-*.html)
rdmd.html
htod.html
http://wiki.dlang.org/Editors (has a link on faq.html)
http://wiki.dlang.org/IDEs (has a link on faq.html)
SUBNAV_FEATURES:
features2.html (of questionable value)
SUBNAV_FAQ:
const-faq.html
rationale.html
appendices.html (just a redirect to dstyle.html)
SUBNAV_APPENDICES:
glossary.html
ascii-table.html (of questionable value)
SUBNAV_ARTICLES:
exception-safe.html
hijack.html
intro-to-datetime.html
lazy-evaluation.html
memory.html (just a redirect to http://wiki.dlang.org/Memory_Management)
migrate-to-shared.html
mixin.html
regular-expression.html
safed.html
templates-revisited.html
tuple.html
variadic-function-templates.html
d-array-article.html

--


[Issue 14295] New: Create rpm and debian packages as part of the build process

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14295

  Issue ID: 14295
   Summary: Create rpm and debian packages as part of the build
process
   Product: D
   Version: D2
  Hardware: x86
OS: Mac OS X
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: installer
  Assignee: nob...@puremagic.com
  Reporter: and...@erdani.com

Per the thread at 
http://forum.dlang.org/thread/me1rac$1n8v$1...@digitalmars.com,
we should add dlang.org/rpm and dlang.org/debian with stable and unstable
packages available for installation.

--


[Issue 14293] min and max with predicate

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14293

--- Comment #1 from Andrei Alexandrescu  ---
Oops, sorry, I meant unary predicates (the "<" is implied):

string x, y;
...
auto s = min!(a => a.length)(x, y, "hello");

--


[Issue 14293] min and max with predicate

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14293

Andrei Alexandrescu  changed:

   What|Removed |Added

  Component|DMD |Phobos

--


[Issue 14294] New: partialSort should also accept two ranges

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14294

  Issue ID: 14294
   Summary: partialSort should also accept two ranges
   Product: D
   Version: D2
  Hardware: x86
OS: All
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: Phobos
  Assignee: nob...@puremagic.com
  Reporter: and...@erdani.com

... just like topN.

--


[Issue 14293] New: min and max with predicate

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14293

  Issue ID: 14293
   Summary: min and max with predicate
   Product: D
   Version: D2
  Hardware: x86
OS: All
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: DMD
  Assignee: nob...@puremagic.com
  Reporter: and...@erdani.com

There should be overloads of min and max with a predicate, e.g. the code below
chooses the shortest string out of three:

string x, y;
...
auto s = min!((a, b) => a.length < b.length)(x, y, "hello");

--


[Issue 14283] [2.067-b4]: Spurious "this is not an lvalue" deprecation message for "auto ref" arguments

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14283

--- Comment #5 from github-bugzi...@puremagic.com ---
Commit pushed to 2.067 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/56e59d841a3854afb8509f5930bfa4016fa7443d
Merge pull request #4497 from MartinNowak/fix14283

fix Issue 14283 - spurious 'this' is not an lvalue deprecation for auto ref

--


[Issue 14292] writing to file opened for reading - error report is nonsense

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14292

Ivan Kazmenko  changed:

   What|Removed |Added

Summary|writing to file opened for  |writing to file opened for
   |reading - nonsense error|reading - error report is
   |report  |nonsense

--


[Issue 14292] writing to file opened for reading - nonsense error report

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14292

Ivan Kazmenko  changed:

   What|Removed |Added

Summary|writing to file opened for  |writing to file opened for
   |reading - incorrect error   |reading - nonsense error
   |report  |report

--


[Issue 14292] New: writing to file opened for reading - incorrect error report

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14292

  Issue ID: 14292
   Summary: writing to file opened for reading - incorrect error
report
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: Phobos
  Assignee: nob...@puremagic.com
  Reporter: ga...@mail.ru

Created attachment 1492
  --> https://issues.dlang.org/attachment.cgi?id=1492&action=edit
the example code

Say we want to overwrite a file "test.txt".
Say we instead have a typo and so open it for reading.
After trying to write to the file, a hilarious message appears:

-
std.exception.ErrnoException@\std\stdio.d(2113):  (No error)
-

The culprit (line 2337 of stdio.d at master currently) is:

-
if (result != writeme.length) errnoEnforce(0);
-

That errnoEnforce(0) produces a nonsense message "...ErrnoException...: (No
error)".
Which I believe is wrong code regardless of the context.
But I don't know which way of reporting the error is right here.

Below is the complete example code.
The file "test.txt" must be present for it to work.
Its contents may be arbitrary.

-
import std.stdio;
void main ()
{
auto f = File ("test.txt", "rt"); // file must exist
f.writeln ("!");
}
-

--


[Issue 14279] [REG:git-head]Failed to make dmd because of idgen : HOST_DC missing

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14279

Denis Shelomovskij  changed:

   What|Removed |Added

 CC||verylonglogin@gmail.com
 Resolution|FIXED   |WONTFIX

--


[Issue 14285] [REG2.063] alias this to nothing is accepted

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14285

Kenji Hara  changed:

   What|Removed |Added

Summary|alias this to nothing is|[REG2.063] alias this to
   |accepted|nothing is accepted

--


[Issue 14285] alias this to nothing is accepted

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14285

Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull
   Hardware|x86_64  |All
 OS|Linux   |All
   Severity|minor   |regression

--- Comment #1 from Kenji Hara  ---
Introduced in: https://github.com/D-Programming-Language/dmd/pull/1685

https://github.com/D-Programming-Language/dmd/pull/4500

--


[Issue 14290] is-expression accepts instantiation of already instantiated template

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14290

Kenji Hara  changed:

   What|Removed |Added

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

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

--


[Issue 14269] Enum is not implicitly converted to base type when using ref

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14269

--- Comment #35 from Dicebot  ---
After small e-mail conversation with Walter we came to compromise that this
specific issue will remain closed as deprecation can possibly be more
problematic than the fix but this won't be considered a normal practice to do
and deprecations for non-critical bug fixes won't be rejected.

--


[Issue 14291] New: Druntime master no longer builds

2015-03-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14291

  Issue ID: 14291
   Summary: Druntime master no longer builds
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: regression
  Priority: P1
 Component: druntime
  Assignee: nob...@puremagic.com
  Reporter: thecybersha...@gmail.com
CC: c...@dawg.eu

I get this when trying to do a clean full build of dlang.org:

../druntime/src/rt/lifetime.d(286): Error: pure function
'rt.lifetime.__setArrayAllocLength' cannot call impure function
'core.atomic.cas!(ubyte, ubyte, ubyte).cas'
../druntime/src/rt/lifetime.d(317): Error: pure function
'rt.lifetime.__setArrayAllocLength' cannot call impure function
'core.atomic.cas!(ushort, ushort, ushort).cas'
../druntime/src/rt/lifetime.d(348): Error: pure function
'rt.lifetime.__setArrayAllocLength' cannot call impure function
'core.atomic.cas!(ulong, ulong, ulong).cas'

Looking at git blame, this was possibly introduced in
34693f48db9c49879c53e451a899f305f7600ff3:
https://github.com/D-Programming-Language/druntime/pull/1187

--