[Issue 15290] length of associative array literal with duplicate keys is wrong

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

Ivan Kazmenko  changed:

   What|Removed |Added

 CC||ga...@mail.ru

--- Comment #1 from Ivan Kazmenko  ---
Stumbled across this one, too:
https://forum.dlang.org/post/choxsofkhspvmpbyg...@forum.dlang.org

My use case is as follows:

foreach (i; 0..10)
foreach (j; 0..10) if (pred2 (i, j))
foreach (k; 0..10) if (pred3 (i, j, k))
... and maybe more ...
{
auto set = [i: true, j: true; k: true];
if (set.length == 3)
{
 ... we found distinct i, j, k, ...
}
}

--


[Issue 17139] [BLOCKING] dscanner needs to handle 'scope' function attributes

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

Walter Bright  changed:

   What|Removed |Added

   Keywords||rejects-valid

--


[Issue 17139] New: [BLOCKING] dscanner needs to handle 'scope' function attributes

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

  Issue ID: 17139
   Summary: [BLOCKING] dscanner needs to handle 'scope' function
attributes
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: blocker
  Priority: P1
 Component: tools
  Assignee: nob...@puremagic.com
  Reporter: bugzi...@digitalmars.com

It's causing circleci to fail in the autotester, preventing progress with using
'scope' annotations:

../dscanner/dsc --config .dscanner.ini --styleCheck $(find etc std -type f
-name '*.d' | grep -vE 'std/traits.d|std/typecons.d') -I.
std/utf.d(3810:40)[error]: 'in', 'out', 'body', or block statement expected

https://github.com/dlang/phobos/pull/5082

--


[Issue 5548] Efficient std.conv.to conversions

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

Jon Degenhardt  changed:

   What|Removed |Added

 CC||jrdemail2000-dl...@yahoo.co
   ||m

--


[Issue 8260] * used three or more times on an array inside std.format.formattedRead and not guarded by template constraint

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

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

https://github.com/dlang/phobos/commit/c34561b284efcf4eb54701e78f3a04813f710437
Fix issue #8260 - allow only pointers as formattedRead parameters

https://github.com/dlang/phobos/commit/c07c3cea3343137b3f3a49c345707fbb8f0b2ba2
Merge pull request #5040 from byebye/issue_8260

Fix issue #8260 - add template constraints for formattedRead parameters

--


[Issue 5548] Efficient std.conv.to conversions

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

Jack Stouffer  changed:

   What|Removed |Added

   Keywords||performance
 CC||j...@jackstouffer.com
   Hardware|Other   |All

--- Comment #4 from Jack Stouffer  ---
Definitely agree that this should exist. Currently in the array overloads,
there are a lot of uses of functions that use appender internally and then
return the managed array with app.data(), only to be appended to another
appender in the parent function. Having OutputRange overloads would represent a
significant performance boost.

Once https://github.com/dlang/phobos/pull/5018 is pulled, I'll start working on
this.

BTW, in the mean time, converting to string can be used with OutputRanges via
std.range.put and std.conv.toChars.

--


[Issue 17138] New: Warn about superfluous "with" statements

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

  Issue ID: 17138
   Summary: Warn about superfluous "with" statements
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: e...@weka.io

When using:

  with(someObject) {
BODY;
  }

And none of the expressions within BODY actually use any members of
"someObject", and the destructor of "someObject" is not called at the end of
the "with" statement, it is a likely bug.

I use the following RAII idiom:

  with(someLock.acquired()) {
..
  }

But get no warning if I accidentally:

  with(someLock) {
  }

--


[Issue 5813] [patch] std.array.Appender has severe performance and memory leak problems.

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

Jack Stouffer  changed:

   What|Removed |Added

 CC||j...@jackstouffer.com
   Hardware|Other   |All
 OS|Windows |All

--


[Issue 17137] New: std.stdio.readln should provide an OutputRange overload

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

  Issue ID: 17137
   Summary: std.stdio.readln should provide an OutputRange
overload
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: j...@jackstouffer.com

--