[Issue 12492] [AA] Clarify what types can be used to get associative array key value

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12492

Ali Cehreli  changed:

   What|Removed |Added

 CC||acehr...@yahoo.com

--- Comment #1 from Ali Cehreli  ---
I hit this problem in a const member function where the member type of .values
turned out to be const:

struct S {
int[char[]] aa;

void constFunc() const {
static assert(is(typeof(aa.keys[0]) == const(char)[]));  // Passes,
good
static assert(is(typeof(aa.values[0]) == int));  // FAILS
}
}

void main() {
}

(In my particular case, I had attempted to sort the copy of values, which had
failed due to const(int) members.)

Note that the workaround of declaring a non-const array is totally safe:

int[] values;
foreach (v; aa.byValue) {
values ~= v;
}

Of course functional style with .byValue would still produce the wrong type:

auto values = aa.byValue.array;
static assert(is(typeof(values[0]) == int));  // FAILS

Ali

--


[Issue 16686] Can not spawn subprocess and read from File at same time

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16686

Alexander Milushev  changed:

   What|Removed |Added

 CC||zunk...@gmail.com

--


[Issue 16682] [REG 2.072] "privatization" of symbols in std.stdio breaks DFMT

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16682

Dicebot  changed:

   What|Removed |Added

 CC||pub...@dicebot.lv

--- Comment #1 from Dicebot  ---
https://github.com/dlang/phobos/pull/4902

--


[Issue 4577] Third way to create a std.typecons.Tuple

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4577

Nick Treleaven  changed:

   What|Removed |Added

 CC||n...@geany.org

--- Comment #1 from Nick Treleaven  ---
This now works:
auto entry = tuple!("index", "value")(4, "Hello");

http://dlang.org/phobos/typecons.html#tuple

Can we close this?

--


[Issue 4851] Three suggestions for std.random

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4851

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

https://github.com/dlang/phobos/commit/783d15bfa0e55d753999e7cc38236763c6b95092
enhancement issue 4851: add choice function to std.random

https://github.com/dlang/phobos/commit/adb71a6c6b8e51680ce2337eb93c28fa7ea9a3fd
enhancement issue 4851: use assert in choice function

https://github.com/dlang/phobos/commit/6bc3a4f343ab653e85d11966a4b559da59c8
Merge pull request #4897 from edi33416/implement_choice

enhancement issue 4851: add choice function to std.random

--


[Issue 16689] New: Errors in instantiated mixin templates should show instantiation point

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16689

  Issue ID: 16689
   Summary: Errors in instantiated mixin templates should show
instantiation point
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Keywords: diagnostic
  Severity: enhancement
  Priority: P5
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: thecybersha...@gmail.com

When an error occurs in an instantiated template, DMD will show where the
template was instantiated (in addition to the location of the error itself).
This does not happen for mixin templates, i.e.:

 test.d 
mixin template Foo()
{
static assert(false, "foo");
}

mixin Foo!();


$ dmd -o- test.d 
test.d(3): Error: static assert  "foo"

DMD should also mention line 6, where the mixin template was instantiated.

--


[Issue 16688] DMD needs to work with the MSC build tools distribution

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16688

--- Comment #1 from ki...@gmx.net ---
LDC already detects it. The registry keys to be looked into (supporting both VS
and the Build Tools alone) can be found here:
https://github.com/ldc-developers/ldc/blob/master/vcbuild/msvcEnv.bat

--


[Issue 4577] Third way to create a std.typecons.Tuple

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4577

Andrei Alexandrescu  changed:

   What|Removed |Added

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

--


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

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16690

  Issue ID: 16690
   Summary: New debug experience: "Children could not be
evaluated" popup with zero length slices (ie, null
ptr)
   Product: D
   Version: D2
  Hardware: x86_64
OS: Windows
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: visuald
  Assignee: nob...@puremagic.com
  Reporter: turkey...@gmail.com

null slices show "Children could not be evaluated" when hovering.
It would be nice if the normal expansion worked, but it was empty instead (no
children listed). The error message leads you to think something is wrong; bad
pointer or something. (yes, null *is* a bad pointer, but if length == 0, any
pointer should be accepted without producing the error)
Same story for null strings obviously.

--


[Issue 16691] New: New debug experience: hovering over a string function argument doesn't display the string

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16691

  Issue ID: 16691
   Summary: New debug experience: hovering over a string function
argument doesn't display the string
   Product: D
   Version: D2
  Hardware: x86_64
OS: Windows
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: visuald
  Assignee: nob...@puremagic.com
  Reporter: turkey...@gmail.com

string f(string s)
{
  return s;
}


Put a breakpoint at "return s;", hover the mouse over 's', you'll see a pointer
appear which you need to expand to see the string.
It would be best if hovering over a string showed the string directly.

--


[Issue 16692] New: New debug experience: possible to execute pure functions during expression evaluation?

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16692

  Issue ID: 16692
   Summary: New debug experience: possible to execute pure
functions during expression evaluation?
   Product: D
   Version: D2
  Hardware: x86_64
OS: Windows
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: visuald
  Assignee: nob...@puremagic.com
  Reporter: turkey...@gmail.com

Is it possible to execute 'pure' functions during expression evaluation?
Being able to hover over properties for instance would be SOOO helpful.

Debug engine would need to be able to evaluate any function arguments, and then
produce a function call using those evaluated arguments, result folds back into
expression evaluation...

--


[Issue 16693] New: Update DConf 2017 announcement on dlang.org

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16693

  Issue ID: 16693
   Summary: Update DConf 2017 announcement on dlang.org
   Product: D
   Version: D2
  Hardware: x86
OS: Mac OS X
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dlang.org
  Assignee: nob...@puremagic.com
  Reporter: tir.kar...@gmail.com

The current page contains an announcement related DConf 2016 closure. Since
DConf 2017 is announced it could be updated to spread the news.

--


[Issue 16558] [Mir] Generic unaligned load/store like (like LDC loadUnaligned and storeUnaligned)

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16558

--- Comment #9 from Walter Bright  ---
https://github.com/dlang/druntime/pull/1693

--


[Issue 16550] Generic SIMD shuffle for Mir

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16550

--- Comment #3 from Walter Bright  ---
The example does not compile with gdc.

--


[Issue 16550] Generic SIMD shuffle for Mir

2016-11-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16550

--- Comment #4 from Walter Bright  ---
I also cannot find any documentation on extractRe() and extractIm(). I googled
for "ldc extractre extractim" and there were no results.

--