[Issue 17193] selective imports -> deprecation warnings even if symbol is not used

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17193

Jack Stouffer  changed:

   What|Removed |Added

 CC||j...@jackstouffer.com
   Hardware|x86_64  |All
 OS|Linux   |All
   Severity|enhancement |normal

--


[Issue 17194] New: [scope] Fwd reference error with nested struct

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17194

  Issue ID: 17194
   Summary: [scope] Fwd reference error with nested struct
   Product: D
   Version: D2
  Hardware: x86_64
OS: Windows
Status: NEW
  Severity: major
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: radu.raca...@gmail.com

The following:

struct V
{
W w;

struct W
{
this(scope ref V v)
{
this.v = 
}
V* v;
}
}

void main()
{
V v;
}

Produces this:

Error: struct app.V no size because of forward reference

Expecting: to compile.

Error is also not pointing the line number the issue was suppose to be.

Work around:

1. Removing the "scope" keyword makes the program compile.

2. Changing W ctor signature to: 

this(scope V* v)
{
 this.v = v;
}

also makes it work.

Compiled with dmd 2.073.1 on win32

--


[Issue 17193] New: selective imports -> deprecation warnings even if symbol is not used

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17193

  Issue ID: 17193
   Summary: selective imports -> deprecation warnings even if
symbol is not used
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

Consider this simple example with foo.d and bar.d:

foo.d:


```
import core.stdc.stdio;

deprecated("To be removed November 2017. Please use std.utf.encode instead.")
void toUTF8(return out char[4] buf, dchar c)
{
pragma(msg, "bar CTFE");
printf("bar()");
}

void toUTF8(S)(S s)
{
pragma(msg, "foo CTFE");
printf("foo()");
}

```

bar.d:


```
void main(string[] args)
{
import foo : toUTF8;
toUTF8("aaa"d);
}

```

> rdmd bar.d foo.d

bar.d(4): Deprecation: function foo.toUTF8 is deprecated - To be removed
November 2017. Please use std.utf.encode instead.
bar.d(4): Deprecation: function foo.toUTF8 is deprecated - To be removed
November 2017. Please use std.utf.encode instead.
foo CTFE
bar CTFE
foo()

bar.d (working)

```
void main(string[] args)
{
import foo;
toUTF8("aaa"d);
}
```

--


[Issue 17192] New: ParameterDefaults fails for member function

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17192

  Issue ID: 17192
   Summary: ParameterDefaults fails for member function
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: regression
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: john.loughran.col...@gmail.com

import std.traits;

struct Base
{
void foo(int i) {}
}

alias blah = ParameterDefaults!(Base.foo);

std/traits.d(1227): Error: variable i cannot be read at compile time
std/traits.d(1228): Error: variable i cannot be read at compile time
std/traits.d(1252): Error: template instance
std.traits.ParameterDefaults!(foo).Get!0LU error instantiating
std/traits.d(1255):instantiated from here: Impl!0LU
test.d(8):instantiated from here: ParameterDefaults!(foo)

bisection isn't totally certain yet, but I'm 90% sure it was caused by this:
https://github.com/dlang/phobos/pull/4889/commits/f783d975a28febea3a323bae3ce5f902cec17aa9

--


[Issue 17191] New: style: require all assert's to be supplied message

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17191

  Issue ID: 17191
   Summary: style: require all assert's to be supplied message
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: greeen...@gmail.com

`assert(0)`'s yield to a segfault without any user-friendly message.
Hence the idea is to require all assert's in Phobos (and druntime) to have a
descriptive error message in case the user ever runs into it.

At the moment there are 302 assert(0)'s without a message at Phobos.
Ideally once all assert's have been supplied with a message, a style check
should be enabled to prevent regressions.

--


[Issue 17190] [REG2.072] isNumeric!string conflict std.traits std.string

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17190

Jonathan M Davis  changed:

   What|Removed |Added

 CC||issues.dl...@jmdavisprog.co
   ||m

--- Comment #1 from Jonathan M Davis  ---
It's a side effect of std.string.isNumeric being templatized in 2.072 to work
with ranges rather than just strings. Before, it wasn't a template, so there
was no ambiguity. Now it is a template, so the two symbols are ambiguous. It's
unfortunate that it's caused problems, but it's not a bug. The only fix would
be to change one of their names, but that would then break any code that used
them. That being said, having a symbol that's an eponymous template have the
same name as a symbol that's a function is bad planning, because they won't
overload. Any code that imports both will have to either import one with a
different name, or it will need to use the full import path when using them.

--


[Issue 17190] New: [REG2.072] isNumeric!string conflict std.traits std.string

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17190

  Issue ID: 17190
   Summary: [REG2.072] isNumeric!string conflict std.traits
std.string
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: regression
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: jbc.enge...@gmail.com

Testcase:
```d
// RUN: dmd -c test.d
import std.string;
import std.traits;

void foo()
{
static if (isNumeric!string) {}
}
```

When both std.string and std.traits are imported, dmd 2.072 and 2.073 error
with:
```
isnum.d(6): Error: std.traits.isNumeric(T) at
/Library/D/dmd/src/phobos/std/traits.d(5350) conflicts with
std.string.isNumeric(S)(S s, bool bAllowSep = false) if (isSomeString!S ||
isRandomAccessRange!S && hasSlicing!S && isSomeChar!(ElementType!S) &&
!isInfinite!S) at /Library/D/dmd/src/phobos/std/string.d(5844)
```

dmd 2.070 and 2.071 compile it fine.

I am not sure whether this is a bug or not.
Thanks,
  Johan

--


[Issue 11650] completion list sorting and visualization

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11650

Rainer Schuetze  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||r.sagita...@gmx.de
 Resolution|--- |FIXED

--- Comment #2 from Rainer Schuetze  ---
You can now select a sort order for the expansion list in the language options.
Try https://github.com/dlang/visuald/releases/tag/v0.44-rc1

--


[Issue 16690] New debug experience: "Children could not be evaluated" popup with zero length slices (ie, null ptr)

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16690

Rainer Schuetze  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||r.sagita...@gmx.de
 Resolution|--- |FIXED

--- Comment #1 from Rainer Schuetze  ---
Fixed in https://github.com/dlang/visuald/releases/tag/v0.44-rc1 (mybe even in
the last beta)

--


[Issue 17126] [Visual D] Enables D compiler on C++ projects by default

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17126

Rainer Schuetze  changed:

   What|Removed |Added

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

--- Comment #4 from Rainer Schuetze  ---
Should be fixed in https://github.com/dlang/visuald/releases/tag/v0.44-rc1

--


[Issue 16991] Make writeln documentation palatable

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16991

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

https://github.com/dlang/phobos/commit/d7f6cc337e9ad1d122aa721d5862d113f6ab709c
Fix Issue 16991 - Make writeln documentation palatable

https://github.com/dlang/phobos/commit/93222f0be436c851b9f032ff2ee0f759c333cafc
Merge pull request #5134 from JackStouffer/stdio-docs

Fix Issue 16991 - Make writeln documentation palatable
merged-on-behalf-of: Sebastian Wilzbach 

--


[Issue 16991] Make writeln documentation palatable

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16991

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

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--


[Issue 17169] New default ddoc theme merges all paragraphs except the first

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17169

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

https://github.com/dlang/dmd/commit/5fcb2ea18bf9434624b8163d80a14f8782639483
Fix issue 17169 - New default ddoc theme merges all paragraphs except the first

https://github.com/dlang/dmd/commit/56ca1da4a46b87d87437abc740c89dbb0af3a8ba
Merge pull request #6538 from jacob-carlborg/issue_17169

--


[Issue 17168] Shift left operator causes segfault when compiling with -O flag

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17168

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

https://github.com/dlang/dmd/commit/dec45d735143737b499f9ce105b74b13b71f3a73
fix Issue 17168

https://github.com/dlang/dmd/commit/7b48c5b05b735182376e6bbd3382afef6072cec8
Merge pull request #6529 from UplinkCoder/fix_elshl

--


[Issue 17176] https://dlang.org/phobos/std_stdio.html#.File.tmpfile broken link

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17176

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

https://github.com/dlang/phobos/commit/565ab34cb0e83ba8149812bf6c580a1becc1ab1d
fix issue 17176 - https://dlang.org/phobos/std_stdio.html#.File.tmpfile broken
link

https://github.com/dlang/phobos/commit/175082dc034226bacce463a1b5979f93daf807ab
Merge pull request #5118 from aG0aep6G/17176

--


[Issue 17161] [REG 2.072.2] Massive Regex Slowdown

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17161

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

https://github.com/dlang/phobos/commit/5a2491a847beb035b37ee2a270029499065b1919
Fix Issue 17161 - Revert all changes to std.regex from 2.072.2 onwards

https://github.com/dlang/phobos/commit/c4f4cfeda6ba60e2df6eef05bc1f8946982e9a99
Merge pull request #5113 from JackStouffer/revert-regex

--


[Issue 10900] Mersenne Twister should have a 64-bit (ulong) version

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10900

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

https://github.com/dlang/phobos/commit/45c515f267b687032b6672921d28b5c7938f6154
Add 64-bit implementation of MersenneTwisterEngine

With the required tempering parameter `d` introduced by the previous
patch, we can now introduce the standard 64-bit implementation of the
Mersenne Twister.  See https://en.wikipedia.org/wiki/Mersenne_Twister
for an explanation of the chosen constants.

Some minimal unittests have been added similar to those already present
for the 32-bit `Mt19937`.  These can be verified by comparison to C++11
by compiling and running the following C++ program:

//

int main ()
{
static_assert(std::mt19937_64::default_seed == 5489,
  "Default seed does not match Phobos!");
std::mt19937_64 gen(std::mt19937_64::default_seed);
std::cout << gen() << std::endl;
for (int i = 0; i < 9998; ++i) {
gen();
}
std::cout << gen() << std::endl;
}
//

Note that the `for` loop in this example advances the generator 9998
times compared to the D unittest's `popFrontN()` because the first
`gen()` call already advances the generator once.

Fixes Issue #10900 .

--


[Issue 10900] Mersenne Twister should have a 64-bit (ulong) version

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10900

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

   What|Removed |Added

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

--


[Issue 17169] New default ddoc theme merges all paragraphs except the first

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17169

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

   What|Removed |Added

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

--


[Issue 17169] New default ddoc theme merges all paragraphs except the first

2017-02-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17169

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

https://github.com/dlang/dmd/commit/5fcb2ea18bf9434624b8163d80a14f8782639483
Fix issue 17169 - New default ddoc theme merges all paragraphs except the first

https://github.com/dlang/dmd/commit/56ca1da4a46b87d87437abc740c89dbb0af3a8ba
Merge pull request #6538 from jacob-carlborg/issue_17169

Fix issue 17169 - New default ddoc theme merges all paragraphs except…

--