[Issue 22775] The __traits does not see the scope attribute

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22775

--- Comment #1 from cbleser  ---
Created attachment 1841
  --> https://issues.dlang.org/attachment.cgi?id=1841&action=edit
Example of the problem

Compile it with
 dmd -dip25 -dip1000 interface_match.d -unittest -main

--


[Issue 22775] The __traits does not see the scope attribute

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22775

cbleser  changed:

   What|Removed |Added

Summary|The __traits does not seem  |The __traits does not see
   |to see the scope attribute  |the scope attribute

--


[Issue 22775] New: The __traits does not seem to see the scope attribute

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22775

  Issue ID: 22775
   Summary: The __traits does not seem to see the scope attribute
   Product: D
   Version: D2
  Hardware: x86_64
   URL: http://dlang.org/
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P3
 Component: dlang.org
  Assignee: nob...@puremagic.com
  Reporter: c...@tagion.org

--


[Issue 22774] TraceInfo is gathered only once when throwing a Throwable

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22774

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@mkykadir created dlang/druntime pull request #3742 "fix Issue 22774 -
TraceInfo is gathered only once when throwing a Thr…" fixing this issue:

- fix Issue 22774 - TraceInfo is gathered only once when throwing a Throwable

  Update `info` during every `throw`

https://github.com/dlang/druntime/pull/3742

--


[Issue 22774] TraceInfo is gathered only once when throwing a Throwable

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22774

muhammed.yu...@bosagora.io changed:

   What|Removed |Added

Summary|TraceInfo is gathered only  |TraceInfo is gathered only
   |once when creating a|once when throwing a
   |Throwable   |Throwable

--


[Issue 22774] New: TraceInfo is gathered only once when creating a Throwable

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22774

  Issue ID: 22774
   Summary: TraceInfo is gathered only once when creating a
Throwable
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: minor
  Priority: P1
 Component: druntime
  Assignee: nob...@puremagic.com
  Reporter: muhammed.yu...@bosagora.io

One can prefer use of single `Exception` instance to prevent creating new
Exception objects and continue `throw`ing that single instance. When this
approach is preferred, Throwable trace info shows trace of the first `throw` of
that exception, which leads to invalid information for following throws.

--


[Issue 22730] master: "dmd -i" doesn't include unit tests from imported modules

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22730

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@MoonlightSentinel created dlang/dmd pull request #13654 "Fix 22730 - Promote
imported files (-i) to root module before parsing the declarations." fixing
this issue:

- Fix 22730 - Promote imported files (-i) to root module before parsing...

  ... the declarations.

  DMD PR 13224 changed the parser s.t. unittests from non-root modules
  are skipped, i.e. not even parsed. The new behaviour didn't work as
  expected when combined with `-i` because it promoted imported files to
  root modules *after* the parser processed the entire file.

  This commit moves the existing checks s.t. they are applied immediatly
  after the module declaration was read by the parser.

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

--


[Issue 15437] documentation for typeof(someTemplate) == void

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15437

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #10 from Dlang Bot  ---
dlang/dlang.org pull request #3218 "Fix issue 15437 - documentation for
typeof(someTemplate) == void" was merged into master:

- 5d5764f978d32dadaeed12afe3dd26992b822b9d by Paul Backus:
  Fix issue 15437 - documentation for typeof(someTemplate) == void

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

--


[Issue 18535] auto-tester fails on Win_32_64 : `The system cannot find the path specified.`

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18535

moonlightsenti...@disroot.org changed:

   What|Removed |Added

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

--- Comment #4 from moonlightsenti...@disroot.org ---
Windows autotester isn't used anymore

--


[Issue 22771] BigInt divMod can return "-0" (negative zero)

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22771

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #2 from Dlang Bot  ---
dlang/phobos pull request #8379 "Fix issue 22771 - BigInt divMod can return
"-0" (negative zero)" was merged into master:

- 6a50e2c05067ecaca8df175e5307f70dbe34c8e1 by dkorpel:
  Fix issue 22771 - BigInt divMod can return "-0" (negative zero)

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

--


[Issue 22773] New: Line with spaces in cmdfile is treated as multiple arguments

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22773

  Issue ID: 22773
   Summary: Line with spaces in cmdfile is treated as multiple
arguments
   Product: D
   Version: D2
  Hardware: All
OS: Windows
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: moonlightsenti...@disroot.org

Each line of a command file should denote a single argument. But dmd will
currently split lines that contain spaces into multiple arguments, e.g.

-JE:\repos\dmd tmp\generated\windows\release\64

is processed as 
1. -JE:\repos\dmd
2. tmp\generated\windows\release\64

--


[Issue 21350] [TestSuite] Failure of test/unit/frontend.d shows as "TARGET: ."

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21350

moonlightsenti...@disroot.org changed:

   What|Removed |Added

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

--- Comment #1 from moonlightsenti...@disroot.org ---
The error message explicitly refers to the `unit` tests instead of `.`

--


[Issue 22772] -vtemplates should measure the cost of the instantiations

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22772

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@maxhaton created dlang/dmd pull request #13653 "Make -vtemplates measure the
time spent instantiating" fixing this issue:

- Fix Issue 22772 - Make -vtemplates give a rough estimate of total compilation
time of a given template

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

--


[Issue 22772] New: -vtemplates should measure the cost of the instantiations

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22772

  Issue ID: 22772
   Summary: -vtemplates should measure the cost of the
instantiations
   Product: D
   Version: D2
  Hardware: x86_64
OS: All
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: maxha...@gmail.com

Some templates cost much more than others, and it's not related to how many
times a template was actually used (not necessarily at least) — the coefficient
in the O(n) matters.

--


[Issue 14277] Compile-time array casting error - ugly error report

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14277

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #6 from Dlang Bot  ---
dlang/dmd pull request #13651 "Fix Issue 14277 - Compile-time array casting
error - ugly error report" was merged into master:

- f08f9c1df2a8b49d2a7245f3c518653bf4b21a5d by RazvanN7:
  Fix Issue 14277 - Compile-time array casting error - ugly error report

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

--


[Issue 15437] documentation for typeof(someTemplate) == void

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15437

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #9 from Dlang Bot  ---
@pbackus created dlang/dlang.org pull request #3218 "Fix issue 15437 -
documentation for typeof(someTemplate) == void" fixing this issue:

- Fix issue 15437 - documentation for typeof(someTemplate) == void

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

--


[Issue 14346] is-expression dependent on instantiation order

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14346

RazvanN  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||razvan.nitu1...@gmail.com
 Resolution|--- |FIXED

--- Comment #4 from RazvanN  ---
(In reply to ag0aep6g from comment #3)
> Reduced further:
> 
> 
> template typeOf(alias From)
> {
> alias typeOf = typeof(From);
> }
> 
> string val;
> int embedded;
> 
> void main()
> {
> foreach(UDA; Tuple!val)
> {
> pragma(msg, typeOf!UDA); /* prints "string", ok */
> }
> foreach(UDA; Tuple!embedded)
> {
> /* THE RESULT OF THIS DEPENDS ON THE LINE ABOVE: */
> pragma(msg, typeOf!UDA); /* prints "string", should print "int" */
> }
> }
> 
> alias Tuple(stuff ...) = stuff;
> 
> 
> This is very similar to issue 14501.

When running the above code the second pragma prints int as expected. It seems
that this has been fixed.

--


[Issue 14277] Compile-time array casting error - ugly error report

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14277

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #5 from Dlang Bot  ---
@RazvanN7 created dlang/dmd pull request #13651 "Fix Issue 14277 - Compile-time
array casting error - ugly error report" fixing this issue:

- Fix Issue 14277 - Compile-time array casting error - ugly error report

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

--


[Issue 22769] `fun()` where fun is a property which returns an object with opCall should call opCall

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22769

--- Comment #8 from anonymous4  ---
If deprecation goes successfully, it may open possibility for implementation of
strict properties.

--


[Issue 22769] `fun()` where fun is a property which returns an object with opCall should call opCall

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22769

--- Comment #7 from anonymous4  ---
But, yeah, presumably it should deprecate a bunch of stuff first.

--


[Issue 22769] `fun()` where fun is a property which returns an object with opCall should call opCall

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22769

--- Comment #6 from anonymous4  ---
Currently it works according to optional parentheses, which is not ambiguous,
since strict properties obviously aren't implemented. If you want to introduce
strict properties gradually, it's a DIP too, what to introduce gradually.

--


[Issue 22769] `fun()` where fun is a property which returns an object with opCall should call opCall

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22769

--- Comment #5 from Vladimir Panteleev  ---
It has been a while, and I think the strict properties DIPs were about entirely
forbidding "someProperty()"; whereas in this case, it may make more sense for
incremental improvement in the form of fixing only syntax which is "ambiguous"
like it is here.

--


[Issue 22771] BigInt divMod can return "-0" (negative zero)

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22771

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@dkorpel created dlang/phobos pull request #8379 "Fix issue 22771 - BigInt
divMod can return "-0" (negative zero)" fixing this issue:

- Fix issue 22771 - BigInt divMod can return "-0" (negative zero)

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

--


[Issue 14302] New style opSlice doesn't compile

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14302

RazvanN  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||razvan.nitu1...@gmail.com
 Resolution|--- |WORKSFORME

--- Comment #2 from RazvanN  ---
I cannot reproduce the failure.

--


[Issue 9249] Defining opCast disables downcasting and explicit upcasting

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9249

RazvanN  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||razvan.nitu1...@gmail.com
 Resolution|--- |INVALID

--- Comment #5 from RazvanN  ---
I don't think this issues is valid. Typically, when defining an overload
operator all uses of that operator are redirected to the overload. That is what
happens in both of the provided examples (upcasting and downcasting). As for
the example of upcasting, one simply needs to avoid the explicit cast to make
it work.

This is all according to the spec and consistent across the other overloaded
operators.

Closing as invalid. Please reopen if I am missing something.

--


[Issue 22739] Segmentation fault in CppMangleVisitor.headOfType

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22739

RazvanN  changed:

   What|Removed |Added

   Keywords||ice
 CC||razvan.nitu1...@gmail.com
   Severity|normal  |critical

--


[Issue 22751] DMD as a library hang with fatal() on parseModule

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22751

RazvanN  changed:

   What|Removed |Added

 CC||razvan.nitu1...@gmail.com

--- Comment #2 from RazvanN  ---
Could please assist your bug reports with a reproducing example? It is hard to
assess whether the bug report and/or the fix are valid without it.

--


[Issue 22760] Segmentation fault in CppMangleVisitor.template_arg

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22760

RazvanN  changed:

   What|Removed |Added

   Keywords||ice
 CC||razvan.nitu1...@gmail.com
   Severity|normal  |critical

--


[Issue 22765] Assertion failure in CppMangleVisitor.template_args

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22765

RazvanN  changed:

   What|Removed |Added

   Keywords||ice
 CC||razvan.nitu1...@gmail.com
   Severity|normal  |critical

--


[Issue 22771] BigInt divMod can return "-0" (negative zero)

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22771

Keivan  changed:

   What|Removed |Added

 CC||keivan.shah@silverleafcaps.
   ||com

--


[Issue 22771] New: BigInt divMod can return "-0" (negative zero)

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22771

  Issue ID: 22771
   Summary: BigInt divMod can return "-0" (negative zero)
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: keivan.s...@silverleafcaps.com

Overview:

In certain cases, when using divMod from std.bigint, it can return remainder
value as "-0" which is incorrect and can causes some logical errors when the
remainder is compared with 0.
The issue happens in case of negative numbers and seems to be a logical error
in the divMod function:
https://github.com/dlang/phobos/blob/2629671c1556a81c4e7eef26e16b331c960e2b6f/std/bigint.d#L2247.
Here the sign is directly copied from the dividend without considering that the
remainder itself can be zero. Comparing the returned remainder with 0 leads to
unexpected logical errors.
The bug is a bit similar to the one resolved here: 
https://issues.dlang.org/show_bug.cgi?id=14124

Steps to Reproduce:

It is present in the currently latest version on D and can be reproduced online
currently (https://run.dlang.io/is/YsaAq8) 

Minimal reproduction code:

void main()
{
import std.bigint;

BigInt dividend = "-50";
BigInt divisor = "1";
BigInt quotient, remainder;
divMod(dividend, divisor, quotient, remainder);
assert(remainder == 0); // This is false, remainder is "-0"
}

--


[Issue 20040] dip1000 implicit delegate attribute stripping fails

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20040

Walter Bright  changed:

   What|Removed |Added

   Keywords||safe

--


[Issue 20149] [DIP1000] Local data escapes `inout` method if not decorated with `return`

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20149

--- Comment #25 from Walter Bright  ---
A further simplified test case:

  @safe:

  struct S {
  //inout(char)* slice() inout return /* gives correct error */
inout(char)* slice() inout  /* no error */
{
return &buf;
}

char buf;
  }

  char* fun() {
S sb;
return sb.slice();
  }

Note that if slice() were made as a static function, with sb passed by ref as
the first parameter, the compilation gives the correct error. Hence it's
related to the `this` being a special case.

--


[Issue 18816] [betterC] Standard Streams Unlinkable

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18816

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #4 from Dlang Bot  ---
dlang/druntime pull request #3740 "fix issue 19933 and 18816: MSVC: Undefined
std{in,out,err} with -betterC" was merged into master:

- e7e6800babed4ff51b6c3b57dfa7e54cb76247f7 by Rainer Schuetze:
  fix issue 19933 and 18816: MSVC: Undefined std{in,out,err} with -betterC

  made stdin/out/err template function return value

https://github.com/dlang/druntime/pull/3740

--


[Issue 19933] MSVC: Undefined std{in,out,err} with -betterC

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19933

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #8 from Dlang Bot  ---
dlang/druntime pull request #3740 "fix issue 19933 and 18816: MSVC: Undefined
std{in,out,err} with -betterC" was merged into master:

- e7e6800babed4ff51b6c3b57dfa7e54cb76247f7 by Rainer Schuetze:
  fix issue 19933 and 18816: MSVC: Undefined std{in,out,err} with -betterC

  made stdin/out/err template function return value

https://github.com/dlang/druntime/pull/3740

--


[Issue 22755] ImportC: declared symbol must be available in initializer

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22755

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #3 from Dlang Bot  ---
dlang/dmd pull request #13650 "fix Issue 22755 - ImportC: declared symbol must
be available in initi…" was merged into master:

- b206e67847c4db4cb394103d1251743452711251 by Walter Bright:
  fix Issue 22755 - ImportC: declared symbol must be available in initializer

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

--


[Issue 22769] `fun()` where fun is a property which returns an object with opCall should call opCall

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22769

--- Comment #4 from anonymous4  ---
This is called "strict properties" and requires a DIP, especially since
previous DIPs about this went nowhere and people in general gave up on sorting
this out. But maybe it's a good time for a new DIP. Among other things to
prohibit stuff like module-level strict extension properties.

--


[Issue 22755] ImportC: declared symbol must be available in initializer

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22755

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #2 from Dlang Bot  ---
@WalterBright created dlang/dmd pull request #13650 "fix Issue 22755 - ImportC:
declared symbol must be available in initi…" fixing this issue:

- fix Issue 22755 - ImportC: declared symbol must be available in initializer

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

--


[Issue 22755] ImportC: declared symbol must be available in initializer

2022-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22755

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com
Summary|ImportC: Error: can only|ImportC: declared symbol
   |`*` a pointer, not a `void` |must be available in
   ||initializer

--