[Issue 17842] [scope] array append allows for escaping references

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17842

Walter Bright  changed:

   What|Removed |Added

   Keywords||safe

--


[Issue 17842] New: [scope] array append allows for escaping references

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17842

  Issue ID: 17842
   Summary: [scope] array append allows for escaping references
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: bugzi...@digitalmars.com

Reported by Mathias Lang:

void main () @safe
{
Object o = test();
assert(o !is null);
}

Object test() @safe
{
scope Object obj = new Object;
scope Object[] arr;
arr ~= obj;
Object[] array;
array ~= arr;// should be an error
return array[0];
}

--


[Issue 11886] "cannot access frame" error on lambda in lambda

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11886

Alex  changed:

   What|Removed |Added

 CC||sascha.or...@gmail.com

--- Comment #9 from Alex  ---
Is #17841 a related issue?

--


[Issue 17841] New: cannot access frame of function

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17841

  Issue ID: 17841
   Summary: cannot access frame of function
   Product: D
   Version: D2
  Hardware: x86
OS: Mac OS X
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: sascha.or...@gmail.com

Given this code


import std.algorithm.iteration : sum, cumulativeFold;
void main()
{
double[5] a;
auto asum = 1.23;
auto jProbs = a[].cumulativeFold!((a, b) => (a + b)/asum);
}


The last line does not compile. 
See
https://forum.dlang.org/post/mplrntaplbtsoyxkw...@forum.dlang.org
probably related to 
https://issues.dlang.org/show_bug.cgi?id=11886 ? 

Used compiler: 
DMD64 D Compiler v2.076.0
on a Mac.

--


[Issue 17836] ICE with custom 'map' template

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17836

--- Comment #5 from Iain Buclaw  ---
(In reply to Iain Buclaw from comment #4)
> 
> This is how you track the 'this' pointer for mmap to the frame of
> printstuffs.
> 

Also note that you can't trust toParent2() here, as it returns the function the
template was declared in. Parent access should be done through toParent() to
properly inspect whether a template comes from another template instance
(declared in another context).

--


[Issue 17836] ICE with custom 'map' template

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17836

--- Comment #4 from Iain Buclaw  ---
Note to anyone looking.

For function call to mmap(...).


Given that:

FuncDeclaration fd = void mmap(T...);

fd.toParent2() == main();
fd.parent.isTemplateInstance() == template mmap(T...);
fd.parent.isTemplateInstance().tinst == template printstuffs(T...);
fd.parent.isTemplateInstance().tinst.toAlias() == void printstuffs(T...);

This is how you track the 'this' pointer for mmap to the frame of printstuffs.

Fix for gdc will happen soon.  Someone will have to look at dmd.

--


[Issue 129] DDoc downgrades enum to their integer initializers

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=129

Iain Buclaw  changed:

   What|Removed |Added

 CC||ibuc...@gdcproject.org

--- Comment #12 from Iain Buclaw  ---
(In reply to Timothee Cour from comment #10)
> https://dlang.org/library/std/process/pipe_process.html
> shows:
> 
> ProcessPipes pipeProcess( 
>   const(char[][]) args, 
>   Redirect redirect = cast(Redirect)7, 
>   const(string[string]) env = cast(const(string[string]))null, 
>   Config config = cast(Config)0, 
>   const(char[]) workDir = null 
> ) @safe; 
> 
> 
> with
> 
> cast(Redirect)7, 
> 
> instead of 
> 
> Redirect redirect = Redirect.all,
> 
> as in source code

Interestingly, when compiling a minimal test - just the enum declarations and
the pipeProcess function - the ddoc generated looks fine.


---

Declaration

@safe ProcessPipes pipeProcess(in char[][] args, Redirect redirect =
Redirect.all, const string[string] env = null, Config config = Config.none, in
char[] workDir = null);

---

I think this should be closed, and other issues stemming from handled in their
respective report numbers.

--


[Issue 17832] std.random.choice cannot be used with other random generators

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17832

Anton Fediushin  changed:

   What|Removed |Added

 CC||fediushin.an...@yandex.ru

--


[Issue 17832] std.random.choice cannot be used with other random generators

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17832

Duncan Paterson  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||dun...@gmail.com
   Assignee|nob...@puremagic.com|dun...@gmail.com

--


[Issue 1820] Let ifti see through static if condition in some cases

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1820

Simen Kjaeraas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||simen.kja...@gmail.com
 Resolution|--- |FIXED

--- Comment #2 from Simen Kjaeraas  ---
Code in this issue compiles and runs correctly on 2.075.1.

--


[Issue 1816] Parameter names not visible in return type in function declarations

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1816

Simen Kjaeraas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||simen.kja...@gmail.com
 Resolution|--- |WONTFIX

--- Comment #3 from Simen Kjaeraas  ---
While the issue described here still exists, the modern-day equivalent of the
give code would use auto, and any complex typeof() expressions would almost
certainly need to be repeated inside the function body in any case, where the
parameter is available.

Closing this. If there are compelling use cases, reopen it with example code.

--


[Issue 1432] Bogus "overlapping initialization" error with structs, unions, and member initializers

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1432

Simen Kjaeraas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||simen.kja...@gmail.com
 Resolution|--- |FIXED

--- Comment #8 from Simen Kjaeraas  ---
This works in 2.075.1.

--


[Issue 1433] in array / slice / range / enum / ...

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1433

Simen Kjaeraas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||simen.kja...@gmail.com
 Resolution|--- |WONTFIX

--- Comment #3 from Simen Kjaeraas  ---
It's generally agreed that in's semantics makes this kind of use problematic,
and different solution should be preferred. These include std.algorithm.among
and canFind.

--


[Issue 3448] `__traits(compiles, )` is true and doesn't gap errors if not in a function

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3448

Simen Kjaeraas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||simen.kja...@gmail.com
 Resolution|--- |FIXED

--- Comment #5 from Simen Kjaeraas  ---
All asserts in this issue pass under 2.075.1. Closing.

--


[Issue 965] `is()` is true and doesn't gap errors if not in a function

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=965

Simen Kjaeraas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||simen.kja...@gmail.com
 Resolution|--- |FIXED

--- Comment #6 from Simen Kjaeraas  ---
All asserts in this issue pass under 2.075.1. Closing.

--


[Issue 17840] Check status of all bugzilla issues below 2000

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17840

Iain Buclaw  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||ibuc...@gdcproject.org
   Assignee|nob...@puremagic.com|ibuc...@gdcproject.org

--


[Issue 17840] New: Check status of all bugzilla issues below 2000

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17840

  Issue ID: 17840
   Summary: Check status of all bugzilla issues below 2000
   Product: D
   Version: D2
  Hardware: Other
OS: Other
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: ibuc...@gdcproject.org

Had a quick spot check, and hit upon a few which look resolved and can be
closed now.

--


[Issue 17839] Review and take ownership or close all github PRs below 6000

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17839

Iain Buclaw  changed:

   What|Removed |Added

Summary|Review and take ownership   |Review and take ownership
   |or close all github PRs |or close all github PRs
   |below 5000  |below 6000

--


[Issue 17839] New: Review and take ownership or close all github PRs below 5000

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17839

  Issue ID: 17839
   Summary: Review and take ownership or close all github PRs
below 5000
   Product: D
   Version: D2
  Hardware: Other
OS: Other
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: ibuc...@gdcproject.org

These are already over two years old, and are just sitting there collecting up
digital cobwebs.

--


[Issue 17839] Review and take ownership or close all github PRs below 5000

2017-09-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17839

Iain Buclaw  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||ibuc...@gdcproject.org
   Assignee|nob...@puremagic.com|ibuc...@gdcproject.org

--