[Issue 14203] Return of floating point values from extern(C++) member functions does not match dmc

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14203

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #5 from Dlang Bot  ---
@WalterBright created dlang/dmd pull request #11675 "fix Issue 14203 - Return
of floating point values from extern(C++) me…" fixing this issue:

- fix Issue 14203 - Return of floating point values from extern(C++) member
functions does not match dmc

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

--


[Issue 19210] Poor error message for `return` function parameter that is not `ref`

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19210

Mathias LANG  changed:

   What|Removed |Added

 CC||monkeywork...@hotmail.com

--- Comment #3 from Mathias LANG  ---
*** Issue 19742 has been marked as a duplicate of this issue. ***

--


[Issue 19742] The compiler suggests annotating parameters with `return`, even if they are marked as `return` or `return scope` already

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19742

Mathias LANG  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||pro.mathias.l...@gmail.com
 Resolution|--- |DUPLICATE

--- Comment #1 from Mathias LANG  ---
Duplicate of 19210, which is fixed in master and will be part of DMD v2.094.0.

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

--


[Issue 20608] [REG2.087] Cannot pass tuple.expand to auto ref T... template argument pack

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20608

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #4 from Dlang Bot  ---
@kinke updated dlang/dmd pull request #10124 "Fix Issue 19754 - Re-apply #9505
and fix it, making isLvalue() logic more restrictive wrt. literals" fixing this
issue:

- Fix Issue 20608 - Revert (obsolete and problematic) #10115

  Which just patched over some cracks wrt. accessing fields of struct
  literals. Not a full revert, as the (useful) test cases are kept.

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

--


[Issue 21216] New: SortedRange.empty should be const, .front should be inout

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21216

  Issue ID: 21216
   Summary: SortedRange.empty should be const, .front should be
inout
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: eiderd...@gmail.com

Example code that fails to compile with DMD 2.093.0 on Linux 64-bit:

import std.range;

class C { }

struct A {
private:
SortedRange!(C[]) _backend;

public:
inout(C) front() inout {
return _backend.front();
}

bool empty() const {
return _backend.empty();
}
}

void main() { }

This generates two errors: Can't call front() on an inout _backend, and can't
call empty() on const _backend. The compiler even suggests annotating
SortedRange's methods with const/inout.

Expected instead: The above code compiles.

Workaround: Replace "SortedRange!(C[]) _backend;" with "C[] _backend;", and
design struct A to ensure that _backend is always sorted.

In Phobos's source for std.range.SortedRange, empty() is declared non-const,
but has a comment "//const". This has been untouched since at least 2014.

---

Related bug:
https://issues.dlang.org/show_bug.cgi?id=9792
length field of a const SortedRange

--


[Issue 20580] -preview=dip1021 compiler crash

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20580

moonlightsenti...@disroot.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||moonlightsentinel@disroot.o
   ||rg
 Resolution|--- |FIXED

--- Comment #2 from moonlightsenti...@disroot.org ---
Doesn't segfault with current master:

.\generated\windows\release\64\dmd.exe -c -o- -preview=dip1021 .\test.d
.\test.d(21): Error: more initializers than fields (1) of UserCollected
.\test.d(25): Error: template instance test.SLL!(PtrTempl!(NodeImpl)) error
instantiating

--


[Issue 18407] debug should escape nothrow

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18407

moonlightsenti...@disroot.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||moonlightsentinel@disroot.o
   ||rg
 Resolution|--- |FIXED

--


[Issue 21215] New: std.range.recurrence leads to an infinite loop

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21215

  Issue ID: 21215
   Summary: std.range.recurrence leads to an infinite loop
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: blocker
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: rus...@winder.org.uk

The following code leads to what seems to be an infinite loop when executed
using "dub test":
```
import std.range: dropExactly, recurrence;

ulong recurrency(immutable ulong n) {
auto sequence = recurrence!((a, n) => a[n - 1] * n)(1UL);
return sequence.dropExactly(n - 1).front;
}

version(unittest) {
import unit_threaded;
}

@("Check the base case")
unittest {
recurrency(0).should == 1;
}

/*
@("Check the property")
unittest {
check!((ubyte n) => recurrency(n + 1) == (n + 1) * recurrency(n));
}
*/
```

--


[Issue 12611] Deprecation and then error for implicit casts that lose precision in foreach index loops

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12611

Mathias LANG  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||pro.mathias.l...@gmail.com
 Resolution|--- |DUPLICATE

--- Comment #1 from Mathias LANG  ---
This has been deprecated. Closing as duplicate of 9570.

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

--


[Issue 9570] Wrong foreach index implicit conversion error

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9570

--- Comment #14 from Mathias LANG  ---
*** Issue 12611 has been marked as a duplicate of this issue. ***

--


[Issue 21214] simd: wrong diagnostic with unsupported vectors

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21214

Iain Buclaw  changed:

   What|Removed |Added

   Keywords||diagnostic, SIMD
 CC||ibuc...@gdcproject.org

--


[Issue 21214] New: simd: wrong diagnostic with unsupported vectors

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21214

  Issue ID: 21214
   Summary: simd: wrong diagnostic with unsupported vectors
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: minor
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: ibuc...@gdcproject.org

__vector(__vector(int[2])[2]) v2x2;
__vector(__vector(int[2])[4]) v2x4;
__vector(__vector(int[4])[2]) v4x2;
__vector(__vector(int[4])[4]) v4x4;


The given test above yields the following errors:

test.d(1): Error: 8 byte vector type __vector(int[2]) is not supported on this
platform
test.d(1): Error: 8 byte vector type __vector(int[2]) is not supported on this
platform
test.d(2): Error: 8 byte vector type __vector(int[2]) is not supported on this
platform
test.d(2): Error: 8 byte vector type __vector(int[2]) is not supported on this
platform
test.d(3): Error: vector type __vector(__vector(int[4])[2]) is not supported on
this platform
test.d(4): Error: vector type __vector(__vector(int[4])[4]) is not supported on
this platform

Instead, they should all produce an error like line 3 and 4.

--


[Issue 19846] zero size function parameter such as byte[0] causes code to not be executed

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19846

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #2 from Dlang Bot  ---
@WalterBright created dlang/dmd pull request #11668 "fix Issue 19846 - zero
size function parameter such as byte[0] causes…" fixing this issue:

- fix Issue 19846 - zero size function parameter such as byte[0] causes code to
not be executed

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

--


[Issue 19846] zero size function parameter such as byte[0] causes code to not be executed

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19846

Walter Bright  changed:

   What|Removed |Added

Summary|Identity function causes|zero size function
   |code returning byte[0] to   |parameter such as byte[0]
   |not be executed |causes code to not be
   ||executed

--


[Issue 504] foreach with a file failes

2020-09-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=504

Dlang Bot  changed:

   What|Removed |Added

 Resolution|WORKSFORME  |FIXED

--- Comment #3 from Dlang Bot  ---
dlang-community/dfmt pull request #505 "Keep line break after function
attributes" was merged into master:

- e6e52cd4d13b77368fef1a78f7ae451a6fcc543e by Eugen Wissner:
  Keep line break after function attributes

  Fixes #504.

https://github.com/dlang-community/dfmt/pull/505

--