[Issue 16060] extern(C++) abstract base class and interface

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16060

Nicholas Wilson  changed:

   What|Removed |Added

 CC||iamthewilsona...@hotmail.co
   ||m

--- Comment #1 from Nicholas Wilson  ---
This is probably the same issue as
https://issues.dlang.org/show_bug.cgi?id=19192

--


[Issue 20123] Impossible to disable post-increment/decrement semantics

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20123

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #2 from Dlang Bot  ---
@thewilsonator updated dlang/dmd pull request #12301 "Fix issue20123 by
allowing opUnaryRight to disable post-[inc|dec]rement" fixing this issue:

- Fix issue 20123 by allowing opUnaryRight to disable post-[inc|dec]rement

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

--


[Issue 21753] Struct literal with function literal member not allowed as template value argument

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21753

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #2 from Dlang Bot  ---
dlang/dmd pull request #12300 "Fix Issue 21753 - Struct literal with function
literal member not allowed" was merged into master:

- abe4ac1b6a3b89865076cc6f33ff18f29d24bd58 by Boris Carvajal:
  Fix Issue 21753 - Struct literal with function literal member not allowed as
template value argument

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

--


[Issue 21753] Struct literal with function literal member not allowed as template value argument

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21753

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@BorisCarvajal created dlang/dmd pull request #12300 "Fix Issue 21753 - Struct
literal with function literal member not allowed" fixing this issue:

- Fix Issue 21753 - Struct literal with function literal member not allowed as
template value argument

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

--


[Issue 21753] New: Struct literal with function literal member not allowed as template value argument

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21753

  Issue ID: 21753
   Summary: Struct literal with function literal member not
allowed as template value argument
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: boris...@gmail.com

From: https://forum.dlang.org/post/syxnzddlnkfwtbvrd...@forum.dlang.org

```d
import std.stdio;

struct Sample{
  void function() func1;
  void function() func2;
}

void noth(Sample smpl)() {
  smpl.func1(); // Error: expression __lambda1 is not a valid template value
argument
  smpl.func2(); // Error: expression __lambda2 is not a valid template value
argument
}

void main(){
  enum s = Sample(
{writeln("Hello world1");},
{writeln("Hello world2");}
  );
  s.func1();
  s.func2();
  noth!(s)();
}
```

A function literal can be a template value argument and the spec says that
"struct literals of template value arguments" are too, so this should be
allowed.

--


[Issue 21752] Template constraint breaks overload resolution

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21752

moonlightsenti...@disroot.org changed:

   What|Removed |Added

   Severity|normal  |regression

--- Comment #1 from moonlightsenti...@disroot.org ---
Regression introduced by https://github.com/dlang/dmd/pull/2826

--


[Issue 21752] New: Template constraint breaks overload resolution

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21752

  Issue ID: 21752
   Summary: Template constraint breaks overload resolution
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: moonlightsenti...@disroot.org

A template constraint for a nested template breaks overload resolution in the
following example (even though the constraint is satisfied). Commenting the
constraint or moving it into a `static assert` fixes the problem.


void foo(A)(A a)
{}

template foo()
{
void foo()()
if (true)  // Comment this constraint to make it pass
{}
}

void main()
{
foo!()();
}


The original code used nested templates to create two variadic parameters but
those are not required to trigger this bug.

--


[Issue 21751] New: std.experimental.logger add possibility to pass a throwable to a log

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21751

  Issue ID: 21751
   Summary: std.experimental.logger add possibility to pass a
throwable to a log
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: etie...@gitrekt.fr

It would be a nice feature to add the possibility to add a Throwable to logs
functions and LogEntry. This would add the possibility to enrich the log with
Exception information (like the stack trace), as it’s possible to do in
languages like Python or java.

--


[Issue 21750] -betterC undefined reference to _memsetn

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21750

Nathan S.  changed:

   What|Removed |Added

   Keywords||betterC
 CC||n8sh.second...@hotmail.com
   Hardware|x86_64  |All
 OS|Windows |All

--- Comment #1 from Nathan S.  ---
This is a proper subset of issue 19946.

--


[Issue 19946] In betterC filling an array with a non-zero value fails for types of size > 1 due to missing _memset16/_memset32/etc.

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19946

Nathan S.  changed:

   What|Removed |Added

 Depends on||21750


Referenced Issues:

https://issues.dlang.org/show_bug.cgi?id=21750
[Issue 21750] -betterC undefined reference to _memsetn
--


[Issue 21750] -betterC undefined reference to _memsetn

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21750

Nathan S.  changed:

   What|Removed |Added

 Blocks||19946


Referenced Issues:

https://issues.dlang.org/show_bug.cgi?id=19946
[Issue 19946] In betterC filling an array with a non-zero value fails for types
of size > 1 due to missing _memset16/_memset32/etc.
--


[Issue 21750] New: -betterC undefined reference to _memsetn

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21750

  Issue ID: 21750
   Summary: -betterC undefined reference to _memsetn
   Product: D
   Version: D2
  Hardware: x86_64
OS: Windows
Status: NEW
  Severity: major
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: ryuukk@gmail.com

The following code produces:

onlineapp.d:15: error: undefined reference to '_memsetn'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1


Only happen in with DMD -betterC, with LDC it compiles fine


Also on a more complex code base i get the following: 

 Error: `TypeInfo` cannot be used with -betterC

When creating a static array as local variable


```

struct Mat4
{
float a;
}

struct Test
{
char[64] a = 0;
Mat4 b;
}

extern (C) int main()
{
Test[1] test;
return 0;
}
```

--


[Issue 21738] std.format.spec: singleSpec should throw on "%%"

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21738

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #2 from Dlang Bot  ---
dlang/phobos pull request #7894 "Fix Issue 21738 - std.format.spec: singleSpec
should throw on "%%"" was merged into master:

- 68c7e183d41413c95b37f2e9cf03efa6791bab4c by wolframw:
  Fix Issue 21738 - std.format.spec: singleSpec should throw on "%%"

https://github.com/dlang/phobos/pull/7894

--


[Issue 21672] [REG][ICE][SIMD] accessing SIMD type as a short causes compiler ice

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21672

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #4 from Dlang Bot  ---
dlang/dmd pull request #12297 "fix Issue 21672 - [REG][ICE][SIMD] accessing
SIMD type as a short cau…" was merged into master:

- 1ab1d61186f2a17d2854b3b9e9fef28b0e4ae2eb by Walter Bright:
  fix Issue 21672 - [REG][ICE][SIMD] accessing SIMD type as a short causes
compiler ice

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

--


[Issue 21749] New: Misleading error message for an operator in an 'alias this'ed type

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21749

  Issue ID: 21749
   Summary: Misleading error message for an operator in an 'alias
this'ed type
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: maxsamu...@gmail.com

struct S {
void opUnary(string op: "++")() {
bad;
}
}

struct S2 {
S s;
alias s this;
}

void main() {
S2 s;
++s;
}

Error: s is not a scalar, it is a S2


The error should be similar to that when the operator is called explicitly:

void main() {
S2 s;
s.opUnary!"++"();
}

onlineapp.d(4): Error: undefined identifier bad
onlineapp.d(15): Error: template instance onlineapp.S.opUnary!"++" error
instantiating

--


[Issue 21403] [ICE] dmd/backend/cgcs.d:375: Assertion `0' failed.

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21403

--- Comment #3 from Walter Bright  ---
And a minimal test case:

 int[] mul11ret3(ref int[] s);

 void test(int[] val) {
(val ~= mul11ret3(val)) ~= 7;
 }

--


[Issue 21403] [ICE] dmd/backend/cgcs.d:375: Assertion `0' failed.

2021-03-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21403

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #2 from Walter Bright  ---
A no-template version:

 int[] mul11ret3(ref int[] s) {
s ~= 11;
return [3];
 }

 int[] test(int[] val) {
(val ~= mul11ret3(val)) ~= 7;
return val;
 }

 void main() {
static assert(test([2]) == [2, 11, 3, 7]);
assert(test([2]) == [2, 11, 3, 7]);
 }

--