[Issue 17432] [DIP1000] scope delegates change type, but not mangling

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

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

   What|Removed |Added

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

--


[Issue 17432] [DIP1000] scope delegates change type, but not mangling

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

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

https://github.com/dlang/dmd/commit/ce9e26f0367b1d7c5d71857bae85b657bd18ba31
fix Issue 17432 - scope delegates change type, but not mangling

do not add "scope" to .mangleof or .stringof if it was inferred

https://github.com/dlang/dmd/commit/6ba296f066ae30c7530b973581e0d9c92fb96665
Merge pull request #6864 from rainers/issue_17432_2

fix Issue 17432 - scope delegates change type, but not mangling

--


[Issue 17293] "Using C++ Classes From D" example no longer works

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

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

https://github.com/dlang/dlang.org/commit/4ec66653c62e9842f253bc4365faac47df876cc0
fix Issue 17293 - 'Using C++ Classes From D' example no longer works

https://github.com/dlang/dlang.org/commit/e544828c41840e7fd2424cb331304bbb2903a155
Merge pull request #1631 from WalterBright/fix17293

fix Issue 17293 - 'Using C++ Classes From D' example no longer works

--


[Issue 17419] add __traits(getLinkage, s) to the the linkage of symbol s

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

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

https://github.com/dlang/dlang.org/commit/7b1e803bc1489573f70da214e173dd5e282f8ea5
Issue 17419 - add __traits(getLinkage, s) to the the linkage of symbol s

https://github.com/dlang/dlang.org/commit/db60ee382b924de9e3f59954c3beb4e47370083e
Merge pull request #1659 from WalterBright/getLinkage

Issue 17419 - add __traits(getLinkage, s) to the the linkage of symbol s

--


[Issue 17472] [Reg 2.075] typeof(stdin) is no longer a File

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

Andrei Alexandrescu  changed:

   What|Removed |Added

 CC||and...@erdani.com

--- Comment #1 from Andrei Alexandrescu  ---
I think we should change client code. It is understood that the change is
liable to regressions. We really should get rid of library initialization code.

--


[Issue 17474] non-property being treated as a property

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

Eyal  changed:

   What|Removed |Added

   Priority|P1  |P3
   Severity|enhancement |major

--


[Issue 17474] New: non-property being treated as a property

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

  Issue ID: 17474
   Summary: non-property being treated as a property
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: e...@weka.io

int* gInt;

ref int* getTheIntPtr(string str = "Hello") {
assert(str !is null);
return gInt;
}

unittest {
int x;
getTheIntPtr = 
getTheIntPtr = null; // oops, assertion failure
}


This has blown up and took us quite a while to figure out we were passing null
as an argument to a function when we use ASSIGNMENT syntax(!!).

--


[Issue 17473] New: foreach on delegates incorrectly rejected

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

  Issue ID: 17473
   Summary: foreach on delegates incorrectly rejected
   Product: D
   Version: D2
  Hardware: All
   URL: http://dlang.org/
OS: All
Status: NEW
  Severity: normal
  Priority: P3
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: e...@weka.io

Here is an incorrect rejection of a valid program:

struct S {
int f(int delegate(char a) dlg) {
char c = cast(char)50;
return dlg(c);
}
}

unittest {
S s;
pragma(msg, typeof());  // int delegate(int delegate(char a) dlg)
foreach(x; ) {}

int delegate(int delegate(char a) dlg) g = 
pragma(msg, typeof(g)); // int delegate(int delegate(char a) dlg)
foreach(x; g) {}// FAILS
}

--


[Issue 17472] New: [Reg 2.075] typeof(stdin) is no longer a File

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

  Issue ID: 17472
   Summary: [Reg 2.075] typeof(stdin) is no longer a File
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: regression
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: c...@dawg.eu

cat > bug.d << CODE
import std.stdio;

private void threadWriter(alias OUT, alias ERR)()
{
OUT = typeof(OUT)("/dev/null", "w");
ERR = typeof(ERR)("/dev/null", "w");
}

alias stdWriter = threadWriter!(stdout, stderr);
CODE

dmd -c bug

/home/dawg/Code/D/bug.d(5): Error: expected 0 arguments, not 2 for non-variadic
function type nothrow @nogc ref @system File()
/home/dawg/Code/D/bug.d(6): Error: expected 0 arguments, not 2 for non-variadic
function type nothrow @nogc ref @system File()
/home/dawg/Code/D/bug.d(9): Error: template instance
bug.threadWriter!(makeGlobal, makeGlobal) error instantiating


Breaks https://github.com/atilaneves/unit-threaded.

Happens because stdin is now an alias.

alias stdin = makeGlobal!(core.stdc.stdio.stdin);

Introduced with https://github.com/dlang/phobos/pull/5421

--


[Issue 17471] deprecated("message") does not work inside function

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

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Andrei Alexandrescu  ---


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

--


[Issue 17211] deprecated is not consistently allowed on local declarations

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

Andrei Alexandrescu  changed:

   What|Removed |Added

 CC||and...@erdani.com

--- Comment #1 from Andrei Alexandrescu  ---
*** Issue 17471 has been marked as a duplicate of this issue. ***

--


[Issue 17471] New: deprecated("message") does not work inside function

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

  Issue ID: 17471
   Summary: deprecated("message") does not work inside function
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: and...@erdani.com

Repro:

void main()
{
deprecated("a") int x;
}

results in:

test.d(3): Error: basic type expected, not (
test.d(3): Error: unexpected ( in declarator
test.d(3): Error: basic type expected, not "a"
test.d(3): Error: found '"a"' when expecting ')'
test.d(3): Error: no identifier for declarator _error_(_error_)
test.d(3): Error: semicolon expected following function declaration
test.d(3): Error: found ')' instead of statement

--


[Issue 17448] Move semantics cause memory corruption and cryptic bugs

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

--- Comment #19 from anonymous4  ---
(In reply to Andrei Alexandrescu from comment #14)
> LDC for example is very adept at
> "destructuring", i.e. exploding a struct into registers and "assembling" it
> back if necessary. Carrying the notion of "immovable structs" through all
> layers would be a major effort for all implementations.

I think it's transparent to LDC: optimizers are conservative, and such
explosion is possible if the optimizer understands the addressing pattern of
the struct content.

--


[Issue 17449] [DIP1000] crash due to covariant conversion of scope delegate to delegate

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

--- Comment #1 from Rainer Schuetze  ---
Reduced test:

void main()
{
void delegate() dg;
void savedg(void delegate() h) { dg = h; }
void foo(int x) { savedg({ assert(x == 42); }); }
foo(42);
dg();
}

Assertion failure with -dip1000, fine without.

It is also ok if dg is made global, so maybe escape analysis fails for local
functions only.

--