[Issue 17791] New: Add __traits(isDeprecated, ...)

2017-08-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17791

  Issue ID: 17791
   Summary: Add __traits(isDeprecated, ...)
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: issues.dl...@jmdavisprog.com

There is currently no way to test whether a particular symbol is deprecated.
This isn't commonly needed, but it can matter when doing introspection on all
of the symbols within a module or class and generating code based on the list
of symbols, since skipping deprecated symbols in those cases would be required
to avoid creating deprecation warnings, and if someone actually used -de, then
the code could not compile because of the inadvertent use of deprecated
symbols, and there would be no way to avoid using those deprecated symbols,
since there's currently no way to introspect whether a symbol is deprecated or
not.

functionAttributes could be improved to include deprecated, but that would only
cover functions, and just about any symbol can be deprecated, so I would
suggest simply adding a new trait to do the test. e.g. __traits(isDeprecated,
symbol).

--


[Issue 8882] map, filter, iota and zip in pure (and nothrow) functions

2017-08-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8882

RazvanN  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||razvan.nitu1...@gmail.com
 Resolution|--- |FIXED

--- Comment #7 from RazvanN  ---
The code in the original bug report now compiles. Closing this as fixed.

--


[Issue 8388] std.traits.MemberFunctionsTuple doesn't work with constructors or destructors

2017-08-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8388

RazvanN  changed:

   What|Removed |Added

 CC||razvan.nitu1...@gmail.com

--- Comment #3 from RazvanN  ---
PR : https://github.com/dlang/phobos/pull/5710

--


[Issue 17790] New: [scope] Escaping pointer possible through array of aggregates

2017-08-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17790

  Issue ID: 17790
   Summary: [scope] Escaping pointer possible through array of
aggregates
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Keywords: safe
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: mathias.l...@sociomantic.com

Compile with -dip1000, the following compiles but shouldn't:

```
struct Foo { int* p; }

void main () @safe
{
int* ptr = bar().p;
assert(ptr !is null);
}

Foo bar () @safe
{
int i;
Foo[] arr = [ Foo() ];
return arr[0];
}
```

--


[Issue 8342] Truly sorted output for topNCopy(zip())?

2017-08-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8342

RazvanN  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||razvan.nitu1...@gmail.com
 Resolution|--- |INVALID

--- Comment #1 from RazvanN  ---
It can sort the output if you pass Yes.sortOutput as the third and final
argument. Closing as invalid

--


[Issue 8494] Return value for Tuple.opAssign

2017-08-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8494

RazvanN  changed:

   What|Removed |Added

 CC||razvan.nitu1...@gmail.com

--- Comment #2 from RazvanN  ---
Making bar return Tuple!int results in successful compilation with git HEAD on
ubuntu 16.04 64-bit. Closing as invalid.

--


[Issue 6110] std.functional: unaryFun should take an array alias.

2017-08-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6110

--- Comment #4 from RazvanN  ---
*** Issue 8324 has been marked as a duplicate of this issue. ***

--


[Issue 8324] Arrays seen as callables for map/filter

2017-08-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8324

RazvanN  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||razvan.nitu1...@gmail.com
 Resolution|--- |DUPLICATE

--- Comment #2 from RazvanN  ---


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

--


[Issue 5418] std.math.lround not implemented on win32 and not documented

2017-08-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5418

RazvanN  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||razvan.nitu1...@gmail.com
 Resolution|--- |FIXED

--