[Issue 11003] Improve .di generation

2015-05-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11003

--- Comment #3 from Kenji Hara k.hara...@gmail.com ---
One more case:

enum isInt(T) = is(T == int);

For that, the generated di still uses old verbose style:

template isInt(T)
{
enum isInt = is(T == int);
}

--
https://github.com/D-Programming-Language/dmd/pull/4629

--


[Issue 277] Named mixin operator resolution

2015-05-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=277

Vlad Levenfeld vlevenf...@gmail.com changed:

   What|Removed |Added

 CC||vlevenf...@gmail.com

--


[Issue 14542] New: Table of contents in specification PDF is broken

2015-05-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14542

  Issue ID: 14542
   Summary: Table of contents in specification PDF is broken
   Product: D
   Version: unspecified
  Hardware: All
OS: All
Status: NEW
  Severity: minor
  Priority: P1
 Component: websites
  Assignee: nob...@puremagic.com
  Reporter: r9shacklef...@gmail.com

Created attachment 1518
  -- https://issues.dlang.org/attachment.cgi?id=1518action=edit
TOC

Screenshot of brokenness is attached, table of contents is generating garbage.

--


[Issue 14539] New: +508KB (684KB - 1191KB) filesize increase Hello, world binary

2015-05-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14539

  Issue ID: 14539
   Summary: +508KB (684KB - 1191KB) filesize increase Hello,
world binary
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: regression
  Priority: P1
 Component: Phobos
  Assignee: nob...@puremagic.com
  Reporter: thecybersha...@gmail.com

https://github.com/D-Programming-Language/phobos/pull/2956#issuecomment-98484651

--


[Issue 14523] New Windows Application uses incorrect initialization/termination code

2015-05-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14523

Rainer Schuetze r.sagita...@gmx.de changed:

   What|Removed |Added

 CC||r.sagita...@gmx.de

--- Comment #1 from Rainer Schuetze r.sagita...@gmx.de ---
Thanks for reporting. It will be updated in the next release.

--


[Issue 14540] New: +~30% increase in compilation time of Hello, world program

2015-05-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14540

  Issue ID: 14540
   Summary: +~30% increase in compilation time of Hello, world
program
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: regression
  Priority: P5
 Component: DMD
  Assignee: nob...@puremagic.com
  Reporter: thecybersha...@gmail.com

https://github.com/D-Programming-Language/dmd/pull/4384#issuecomment-98485564

--


[Issue 14524] Right clicking in solution explorer to add folders does not work as expected

2015-05-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14524

Rainer Schuetze r.sagita...@gmx.de changed:

   What|Removed |Added

 CC||r.sagita...@gmx.de

--- Comment #1 from Rainer Schuetze r.sagita...@gmx.de ---
The new folder mechanism follows the C++ way where it's called filter: it
is merely a grouping of files, but does not need to correspond to directories
on disk.
You can create create both a project folder and a directory by using Add-New
Item and selecting Package.

--


[Issue 14538] New: ICE(cast.c, typeMerge) - Assertion failed: (t1-ty == t2-ty)

2015-05-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14538

  Issue ID: 14538
   Summary: ICE(cast.c, typeMerge) - Assertion failed: (t1-ty ==
t2-ty)
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: major
  Priority: P1
 Component: DMD
  Assignee: nob...@puremagic.com
  Reporter: ibuc...@gdcproject.org

First raised in GDC: http://bugzilla.gdcproject.org/show_bug.cgi?id=173

Confirmed is upstream: http://dpaste.dzfl.pl/3082491df870

Reduced test:
---
struct Cell
{
dchar code;
alias code this;
}

struct Row
{
Cell[] fCells;
Cell opIndex(int x) { return (x = 0) ? fCells[x] : ' '; } 
}

--


[Issue 14541] New: duplicate COMDAT linker error with the template forward reference in Tuple.opAssign

2015-05-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14541

  Issue ID: 14541
   Summary: duplicate COMDAT linker error with the template
forward reference in Tuple.opAssign
   Product: D
   Version: D2
  Hardware: x86_64
OS: Windows
Status: NEW
  Keywords: link-failure, rejects-valid
  Severity: normal
  Priority: P1
 Component: DMD
  Assignee: nob...@puremagic.com
  Reporter: k.hara...@gmail.com

Command line and error message:

$ dmd -m64 test
test.obj : fatal error LNK1179: invalid or corrupt file: duplicate COMDAT
'_D6traits14__T5TupleTiTiZ5Tuple44__T8opAssignTS6traits14__T5TupleTiTiZ5TupleZ8opAssignMFNaNbNiNfS6traits14__T5TupleTiTiZ5TupleZv'
--- errorlevel 1179


Source files with explanation comments:

 test.d
import traits;

void main()
{
Tuple!(int, int) result;

alias T = typeof(result);
static assert(hasElaborateAssign!T);
// hasElablrateAssign!(Tuple(int, int)):
// 1. instantiates Tuple!(int, int).opAssign!(Tuple!(int, int)) [auto ref =
Rvalue]
//2. instantiates swap!(Tuple!(int, int))
//   3. instantiates hasElablrateAssign!(Tuple!(int, int))
//  -- forward reference error
//   -- swap!(Tuple!(int, int)) fails to instantiate
//-- Tuple!(int, int).opAssign!(Tuple!(int, int)) [auto ref = rvalue]
fails to instantiate
// 4. instantiates Tuple!(int, int).opAssign!(Tuple!(int, int)) [auto ref =
Lvalue]
//-- succeeds
// hasElablrateAssign!(Tuple(int, int)) succeeds to instantiate (result is
'true')

// Instantiates Tuple!(int, int).opAssign!(Tuple!(int, int)) [auto ref =
Rvalue], but
// it's already done in gagged context, so this is made an error
reproduction instantiation.
// -- 1st error reproduction instantiation
// But, the forward reference of hasElablrateAssign!(Tuple(int, int)) is
alredy resolved, so
// the instantiation will succeeds.
result = Tuple!(int, int)(0, 0);

// Instantiates Tuple!(int, int).opAssign!(Tuple!(int, int)) [auto ref =
Rvalue], but
// it's already done in gagged context, so this is made an error
reproduction instantiation.
// -- 2nd error reproduction instantiation
// But, the forward reference of hasElablrateAssign!(Tuple(int, int)) is
alredy resolved, so
// the instantiation will succeeds.
result = Tuple!(int, int)(0, 0);

// The two error reproduction instantiations generate the function:
//   Tuple!(int, int).opAssign!(Tuple!(int, int)) [auto ref = Rvalue]
// twice, then it will cause duplicate COMDAT error in Win64 platform.
}

 traits.d
template hasElaborateAssign(S)
{
static if (is(S == struct))
{
extern __gshared S lvalue;

enum hasElaborateAssign = is(typeof(S.init.opAssign(S.init))) ||
  is(typeof(S.init.opAssign(lvalue)));
}
else
{
enum bool hasElaborateAssign = false;
}
}

void swap(T)(ref T lhs, ref T rhs) @trusted pure nothrow @nogc
{
static if (hasElaborateAssign!T)
{
}
else
{
}
}

template Tuple(Types...)
{
struct Tuple
{
Types field;
alias field this;

this(Types values)
{
field[] = values[];
}

void opAssign(R)(auto ref R rhs)
{
static if (is(R : Tuple!Types)  !__traits(isRef, rhs))
{
// Use swap-and-destroy to optimize rvalue assignment
swap!(Tuple!Types)(this, rhs);
}
else
{
// Do not swap; opAssign should be called on the fields.
field[] = rhs.field[];
}
}
}
}

--


[Issue 14538] ICE(cast.c, typeMerge) - Assertion failed: (t1-ty == t2-ty)

2015-05-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14538

Iain Buclaw ibuc...@gdcproject.org changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 CC||ibuc...@gdcproject.org

--


[Issue 14539] +508KB (684KB - 1191KB) filesize increase Hello, world binary

2015-05-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14539

Vladimir Panteleev thecybersha...@gmail.com changed:

   What|Removed |Added

   Priority|P1  |P5

--


[Issue 14541] duplicate COMDAT linker error with the template forward reference in Tuple.opAssign

2015-05-03 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14541

Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Kenji Hara k.hara...@gmail.com ---
https://github.com/D-Programming-Language/dmd/pull/4626#issuecomment-98389722

--