[Issue 15161] Parser bug on ref delegates

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15161

Basile-z  changed:

   What|Removed |Added

   Keywords||rejects-valid
 CC||b2.t...@gmx.com

--


[Issue 19757] New: crash on invalid initializer at CTFE

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19757

  Issue ID: 19757
   Summary: crash on invalid initializer at CTFE
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Keywords: CTFE, ice
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: b2.t...@gmx.com

crash when trying to convert "oops" to a size_t giving "s" dim.

---
auto s = new string("oops");
---

--


[Issue 14441] Strange error with string ctor

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14441

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |INVALID

--- Comment #1 from Basile-z  ---
string is not a builtin type, it's an alias to an array, so the rule for
uniform constructor call doesn't apply.

--


[Issue 14190] Overload sets example incorrect

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14190

Basile-z  changed:

   What|Removed |Added

 CC||b2.t...@gmx.com
  Component|dmd |dlang.org

--


[Issue 14094] Using string import in map results in error message with __error

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14094

Basile-z  changed:

   What|Removed |Added

   Keywords||diagnostic
 CC||b2.t...@gmx.com

--


[Issue 14068] [AA] Concurrent access allowed

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14068

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |DUPLICATE

--- Comment #1 from Basile-z  ---


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

--


[Issue 16597] Initializing a shared hashmap segfaults

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16597

Basile-z  changed:

   What|Removed |Added

 CC||dfj1es...@sneakemail.com

--- Comment #4 from Basile-z  ---
*** Issue 14068 has been marked as a duplicate of this issue. ***

--


[Issue 14032] [ICE](mtype.c line 154) with std.algorithm.tee

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14032

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |WORKSFORME

--


[Issue 19645] Default parameters not checked for @safe

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19645

--- Comment #7 from Walter Bright  ---
Spec fix:

https://github.com/dlang/dlang.org/pull/2607

--


[Issue 19645] Default parameters not checked for @safe

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19645

--- Comment #6 from Dlang Bot  ---
@WalterBright created dlang/dlang.org pull request #2607 "fix Issue 19645 -
Default parameters not checked for @safe" fixing this issue:

- fix Issue 19645 - Default parameters not checked for @safe

https://github.com/dlang/dlang.org/pull/2607

--


[Issue 13570] shared class with a templated struct generate an error with no line

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13570

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |WORKSFORME

--


[Issue 13455] Side effects of comma operator not evaluated for empty 'expression tuple' right hand side

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13455

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |WORKSFORME

--- Comment #1 from Basile-z  ---
problem was solved differently since using the result of comma expr is not
allowed anymore

--


[Issue 13370] Allow @nogc delegates in foreach

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13370

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |INVALID

--


[Issue 13357] [ICE] Segfault on comparison of rvalue __vector and array

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13357

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |WORKSFORME

--


[Issue 13246] _d_invariant called on final class without invariants

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13246

Basile-z  changed:

   What|Removed |Added

 CC||b2.t...@gmx.com

--


[Issue 13191] Silenced forward struct reference error

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13191

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |WORKSFORME

--- Comment #1 from Basile-z  ---
correct message with "forward reference" nowadays

--


[Issue 12993] DMD keeps references to symbols removed

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12993

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |WORKSFORME

--


[Issue 19645] Default parameters not checked for @safe

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19645

--- Comment #5 from Walter Bright  ---
To be specific:

-
  module m;
  shared int b;
  pure void g(int a=b){}
-
  import m;
  int b;
  pure void f()
  {
g();
  }
-

should be compiled as if written:

-
  module m;
  shared int b;
  pure void g(int a=b){}
-
  import m;
  int b;
  pure void f()
  {
g(m.b);  // pick m.b, not local b
  }
-

--


[Issue 12759] allow spaces after switches

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12759

Basile-z  changed:

   What|Removed |Added

 CC||b2.t...@gmx.com
   Hardware|x86_64  |All
 OS|Linux   |All

--


[Issue 12757] Refused fixed size array literal function argument

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12757

Basile-z  changed:

   What|Removed |Added

   Keywords|rejects-valid   |
 CC||b2.t...@gmx.com
   Hardware|x86 |All
 OS|Windows |All

--


[Issue 12587] Ommiting type when auto declaration in static members results in error

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12587

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |WORKSFORME

--


[Issue 19756] Add extended attributes support to std.file

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19756

--- Comment #2 from Vladimir Panteleev  ---
I think those are the alternate data streams I mentioned. NTFS extended
attributes ("EA") are different. See e.g. the documentation for ZwQueryEaFile.

--


[Issue 19756] Add extended attributes support to std.file

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19756

Richard Cattermole  changed:

   What|Removed |Added

 CC||alphaglosi...@gmail.com

--- Comment #1 from Richard Cattermole  ---
I found out a few details for Windows.

To list all extended attributes use FindFirstStreamW and FindNextStreamW
providing the file name.

To read or write attributes, use standard file IO functions but use the file
name in the format of: "filename:attribute:$DATA". Note that ":$DATA" will be
appended if gotten from e.g. FindFirstStreamW.

DigitalMars libc will not work for interacting with the attributes. But MSVC's
will. I would recommend using WriteFile and ReadFile from WinAPI instead of
using the libc abstraction.

To delete an attribute you can use CreateFileW (on close). Note: if you delete
the stream "filename::$DATA" the file will be deleted.

We also need to create fileapi.h as part of the Windows bindings. Its missing
and contains the two main functions with their related declarations.

While we are at it, it might be a good idea to extend std.mmap to be able to
use these attributes as a source of a file (if possible).

--


[Issue 19657] D compiler fails to resolve circular module dependency when modules are compiled together

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19657

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #3 from Dlang Bot  ---
@puneet created dlang/dmd pull request #9471 "Fix issues 19655, 19656, 19657,
19746 & 19750" fixing this issue:

- Fix issues 19655, 19656, 19657, 19746 & 19750

  The Semantic (pass 1) analysis for classes is handled by
visit(ClassDeclaration ) method of DsymbolSemanticVisitor class. For a given
class, this method may be run multiple times in order to resolve forward
references. The method incrementally tries to resolve the types referred to by
the members of the class.

  The subsequent calls to this method are short-circuited if the class members
have been fully analyzed. For this the code tests that it is not the first/main
call to the method (semanticRun == PASS.init else branch), scx is not set, and
that the cldec.symtab is already set. If all these conditions are met, the
method returns. But before returning, the method was setting cldec.semanticRun
to PASS.semanticdone. It should not set semanticRun since the class has not
been fully analyzed yet. The base class analysis for this class could be
pending and as a result vtable may not have been fully created.

  This fake setting of semanticRun results in the semantic analyzer to believe
that the class has been fully analyzed. As exposed by the issues 19656, 19657,
19746 and 19750, it may result in compile time errors when a derived type class
is getting analyzed and because of this fake semanticdone on the base class,
the semantic analysis construes that an overridden method is not defined in the
base class. Issue 19655 exposes a scenario where a buggy vtable may be created
and a call to class method may result in execution of some adhoc code.

https://github.com/dlang/dmd/pull/9471

--


[Issue 19656] D compiler fails to resolve circular module dependency when modules are compiled separately

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19656

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #6 from Dlang Bot  ---
@puneet created dlang/dmd pull request #9471 "Fix issues 19655, 19656, 19657,
19746 & 19750" fixing this issue:

- Fix issues 19655, 19656, 19657, 19746 & 19750

  The Semantic (pass 1) analysis for classes is handled by
visit(ClassDeclaration ) method of DsymbolSemanticVisitor class. For a given
class, this method may be run multiple times in order to resolve forward
references. The method incrementally tries to resolve the types referred to by
the members of the class.

  The subsequent calls to this method are short-circuited if the class members
have been fully analyzed. For this the code tests that it is not the first/main
call to the method (semanticRun == PASS.init else branch), scx is not set, and
that the cldec.symtab is already set. If all these conditions are met, the
method returns. But before returning, the method was setting cldec.semanticRun
to PASS.semanticdone. It should not set semanticRun since the class has not
been fully analyzed yet. The base class analysis for this class could be
pending and as a result vtable may not have been fully created.

  This fake setting of semanticRun results in the semantic analyzer to believe
that the class has been fully analyzed. As exposed by the issues 19656, 19657,
19746 and 19750, it may result in compile time errors when a derived type class
is getting analyzed and because of this fake semanticdone on the base class,
the semantic analysis construes that an overridden method is not defined in the
base class. Issue 19655 exposes a scenario where a buggy vtable may be created
and a call to class method may result in execution of some adhoc code.

https://github.com/dlang/dmd/pull/9471

--


[Issue 19746] DMD fails to compile some circular dependencies spiced with is (T == super) condition

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19746

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@puneet created dlang/dmd pull request #9471 "Fix issues 19655, 19656, 19657,
19746 & 19750" fixing this issue:

- Fix issues 19655, 19656, 19657, 19746 & 19750

  The Semantic (pass 1) analysis for classes is handled by
visit(ClassDeclaration ) method of DsymbolSemanticVisitor class. For a given
class, this method may be run multiple times in order to resolve forward
references. The method incrementally tries to resolve the types referred to by
the members of the class.

  The subsequent calls to this method are short-circuited if the class members
have been fully analyzed. For this the code tests that it is not the first/main
call to the method (semanticRun == PASS.init else branch), scx is not set, and
that the cldec.symtab is already set. If all these conditions are met, the
method returns. But before returning, the method was setting cldec.semanticRun
to PASS.semanticdone. It should not set semanticRun since the class has not
been fully analyzed yet. The base class analysis for this class could be
pending and as a result vtable may not have been fully created.

  This fake setting of semanticRun results in the semantic analyzer to believe
that the class has been fully analyzed. As exposed by the issues 19656, 19657,
19746 and 19750, it may result in compile time errors when a derived type class
is getting analyzed and because of this fake semanticdone on the base class,
the semantic analysis construes that an overridden method is not defined in the
base class. Issue 19655 exposes a scenario where a buggy vtable may be created
and a call to class method may result in execution of some adhoc code.

https://github.com/dlang/dmd/pull/9471

--


[Issue 19655] DMD generates wrong code for some circular dependencies

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19655

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #2 from Dlang Bot  ---
@puneet created dlang/dmd pull request #9471 "Fix issues 19655, 19656, 19657,
19746 & 19750" fixing this issue:

- Fix issues 19655, 19656, 19657, 19746 & 19750

  The Semantic (pass 1) analysis for classes is handled by
visit(ClassDeclaration ) method of DsymbolSemanticVisitor class. For a given
class, this method may be run multiple times in order to resolve forward
references. The method incrementally tries to resolve the types referred to by
the members of the class.

  The subsequent calls to this method are short-circuited if the class members
have been fully analyzed. For this the code tests that it is not the first/main
call to the method (semanticRun == PASS.init else branch), scx is not set, and
that the cldec.symtab is already set. If all these conditions are met, the
method returns. But before returning, the method was setting cldec.semanticRun
to PASS.semanticdone. It should not set semanticRun since the class has not
been fully analyzed yet. The base class analysis for this class could be
pending and as a result vtable may not have been fully created.

  This fake setting of semanticRun results in the semantic analyzer to believe
that the class has been fully analyzed. As exposed by the issues 19656, 19657,
19746 and 19750, it may result in compile time errors when a derived type class
is getting analyzed and because of this fake semanticdone on the base class,
the semantic analysis construes that an overridden method is not defined in the
base class. Issue 19655 exposes a scenario where a buggy vtable may be created
and a call to class method may result in execution of some adhoc code.

https://github.com/dlang/dmd/pull/9471

--


[Issue 19756] Add extended attributes support to std.file

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19756

Vladimir Panteleev  changed:

   What|Removed |Added

 CC||dlang-bugzilla@thecybershad
   ||ow.net

--


[Issue 19756] New: Add extended attributes support to std.file

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19756

  Issue ID: 19756
   Summary: Add extended attributes support to std.file
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P4
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: dlang-bugzi...@thecybershadow.net

Many operating systems and filesystems support adding short, arbitrarily-named
attributes to files. The way this is done is OS-specific. std.file should
provide a cross-platform interface to set, query, enumerate, and remove these
attributes.

The following supported OSes support extended attributes:

- Linux (getxattr family of functions, already in Druntime)

- FreeBSD (VOP_GETEXTATTR family)

- OSX (getxattr but a different API)

- Windows apparently supports extended attributes in FAT, HPFS, and NTFS. 

  I found some sample PowerShell code to access them here:
  https://gist.github.com/jaredcatkinson/f1cd44a8605e05c2661bdeca558c03e1
  However, it seems to be using kernel mode APIs and I'm not sure how that's
done from userspace. More research is needed. Windows seems to have a protected
"$Kernel." namespace which is similar to the "system." namespace in the Linux
kernel.

  Note that alternate data streams (a different feature present in some
filesystems) is occasionally used for metadata on Windows, see e.g.
"Zone.Identifier" which is used to control whether to prompt users when opening
files downloaded from the Internet.

I have an implementation of a D wrapper around the Linux APIs here:

https://github.com/cybershadow/ae/blob/master/sys/file.d (search for XAttr)

The interface should be suitable for other platforms as well.

--


[Issue 19755] Compiler crash

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19755

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #2 from Dlang Bot  ---
dlang/dmd pull request #9470 "fix issue 19755 - Compiler crash" was merged into
stable:

- bfd0429f1b5b877281b06562deb176a6133c2eab by Basile Burg:
  fix issue 19755 - Compiler crash

https://github.com/dlang/dmd/pull/9470

--


[Issue 19731] auto struct methods whose address is taken don't test invariants

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19731

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #7 from Dlang Bot  ---
dlang/dmd pull request #9467 "Fix Issue 19731 - auto struct methods whose
address is taken don't test invariants" was merged into master:

- 3f52528e2dd40f116202dac1a8e4d34326c5bc3b by RazvanN7:
  Fix Issue 19731 - auto struct methods whose address is taken don't test
invariants

https://github.com/dlang/dmd/pull/9467

--


[Issue 19752] dip1000 isn't @safe if struct contains a slice

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19752

--- Comment #3 from Atila Neves  ---
> I believe this is because adding a slice member to Container makes it a type 
> with indirections, whereas it was not before. DIP1000 only applies to types 
> with indirections.

In either case, `Range` is a type with an indirection, and `this` is an
indirection itself, so the error message that "cannot take the address of a
scope parameter this is @safe function range" makes no sense. The function is
deliberately `return scope` so that the lifetime of the return value is tied to
`this` and shouldn't be able to outlive it.

--


[Issue 19755] Compiler crash

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19755

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@Basile-z created dlang/dmd pull request #9470 "fix issue 19755 - Compiler
crash" fixing this issue:

- fix issue 19755 - Compiler crash

https://github.com/dlang/dmd/pull/9470

--


[Issue 19755] Compiler crash

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19755

Basile-z  changed:

   What|Removed |Added

   Keywords||ice
 CC||b2.t...@gmx.com
   Hardware|x86_64  |All
 OS|Linux   |All
   Severity|enhancement |normal

--


[Issue 19755] New: Compiler crash

2019-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19755

  Issue ID: 19755
   Summary: Compiler crash
   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

This piece of code generates a crash on both dmd and ldc:

struct Thunk(Dummy) {
void opAssign(int dlg) {}
auto get() inout {
Thunk* self;
self.x = 0;
}
alias get this;
}

alias T = Thunk!int;

--