[Issue 10811] Order dependent IFTI failure

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10811


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

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-08-12 23:10:59 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2472
https://github.com/D-Programming-Language/phobos/pull/1473

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10729] Some exception symbols undefined

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10729



--- Comment #5 from Kenji Hara k.hara...@gmail.com 2013-08-12 23:45:54 PDT ---
(In reply to comment #4)
  Maybe you are still link old phobos.lib (2.063 or earlier). After git head
  rebuild, you would forgot to place the generated phobos.lib (in
  dmd2\src\phobos\) on correct lib path (dmd2\windows\lib\phobos.lib by 
  default).
 
 I don't think so. Every time I finished rebuilding druntime and phobos, I
 always copy the new druntime.lib and phobos.lib into my dmd directory,
 replacing the old ones.
 
 Anyway, I just repeated the compilation process, just to make sure. Here's the
 screencast of it:
 http://youtu.be/Fu1P0HGkZXA

Hmm... As far as I see the video, the operation would have no critical problem.
But I have still some questions.

1. Do you really use the recompiled and copied dmd.exe in C:\dmd\bin ?
   You set the PATH=%PATH%;C:\dm\bin;C:\dmd\bin first, but I'm not sure that
the previous PATH does not contain wrong directory path.
2. Do you use intended sc.ini file?
   Read http://dlang.org/dmd-windows.html#sc_ini and check related paths.

Honestly I cannot reproduce the issue in my local environment (I'm using
Windows 7). It seems to me that the issue is in your development environment.
Sorry for my poor reply...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10729] Some exception symbols undefined

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10729



--- Comment #6 from Kenji Hara k.hara...@gmail.com 2013-08-12 23:51:42 PDT ---
I just noticed that, the undefined symbol in comment#0 and comment#2 are
different (four std.uni symbols added).

And, few days ago std.uni module is drastically improved by
https://github.com/D-Programming-Language/phobos/pull/1347 .

Looks to me that your environment does not seem to follow it.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10807] Strange error message with template, __traits and property syntax

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10807



--- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-08-13 00:01:29 PDT ---
(In reply to comment #0)
 The following code:
 
[snip]
 
 Gives the following compile error:
 
 Error: cannot resolve type for a.size()()
 Error: dottd has no effect in expression (a.size()())
 
 As far as I know dottd is an internal name in the compiler.

This issue does not occur with git head (b4584d77bd).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10813] ICE(DMD2.063) template.c:6040: Identifier* TemplateInstance::genIdent(Objects*): Assertion `global.errors' failed

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10813



--- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-08-13 00:04:22 PDT ---
(In reply to comment #0)
 import std.typecons;
 
 T test(T, Tup: Tuple!(T))(Tup t)
 {
 return t[0];
 }
 
 void main() {}
 
 
 http://dpaste.dzfl.pl/ba070d91

The issue does not occur with git head (b4584d77bd).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10729] Some exception symbols undefined

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10729



--- Comment #7 from Andre Tampubolon an...@lc.vlsm.org 2013-08-13 00:10:12 
PDT ---
 1. Do you really use the recompiled and copied dmd.exe in C:\dmd\bin ?
You set the PATH=%PATH%;C:\dm\bin;C:\dmd\bin first, but I'm not sure that
 the previous PATH does not contain wrong directory path.

This is the default content of my PATH:
C:\Program Files\Haskell\bin;C:\Haskell
Platform\2013.2.0.0\lib\extralibs\bin;C:\Haskell
Platform\2013.2.0.0\bin;C:\Program Files\Broadcom\Broadcom
802.11\Driver;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program
Files\WIDCOMM\Bluetooth Software\;C:\Program Files\Microsoft ASP.NET\ASP.NET
Web Pages\v1.0\;C:\Program Files\Windows Kits\8.0\Windows Performance
Toolkit\;C:\Program Files\GNU\GnuPG;C:\sbt\;C:\Program Files\Microsoft
SDKs\TypeScript\0.8.1.1\;C:\Program Files\nodejs;c:\Program Files\ATI
Technologies\ATI.ACE\Core-Static;C:\Program Files\Microsoft SQL
Server\110\Tools\Binn\;C:\Program Files\Microsoft\Web Platform
Installer\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Python27;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files\GNU\GnuPG\pub;C:\Program Files\Flash Magic;C:\Program
Files\TortoiseHg\;C:\Program Files\TortoiseSVN\bin;C:\Program
Files\Java\jdk1.7.0_25\bin;C:\Haskell
Platform\2013.2.0.0\mingw\bin;C:\Users\CSL-NB-064\AppData\Roaming\cabal\bin;C:\Vim\vim74;C:\scala\bin;C:\mingw\bin;C:\FASM;C:\Users\CSL-NB-064\AppData\Local\Pandoc\;C:\texlive\2013\bin\win32;C:\Program
Files\Git\bin 

As you can see, the path to Digital Mars C and D compiler are not included.


 2. Do you use intended sc.ini file?
Read http://dlang.org/dmd-windows.html#sc_ini and check related paths.

Here's my sc.ini :
[Environment]
LIB=C:\dmd\lib
DFLAGS=-IC:\dmd\import -IC:\dmd\phobos
LINKCMD=link.exe

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10729] Some exception symbols undefined

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10729



--- Comment #8 from Kenji Hara k.hara...@gmail.com 2013-08-13 00:41:48 PDT ---
Looks not bad to me. Strange...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10814] New: Formatting string-based enum prints its name instead of its value

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10814

   Summary: Formatting string-based enum prints its name instead
of its value
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-08-13 
02:17:00 PDT ---
-
import std.stdio;

enum Type : string
{
button = type::button,
}

void main()
{
writeln(Type.button);

writefln(%s, Type.button);

writeln(cast(string)Type.button);
}
-

Prints:
button
button
type::button

It's really strange that we have to cast an enum just to retrieve the actual
value.

Note for example what happens when you use '%d' on an enum:

-
import std.stdio;

enum Type : int
{
button = 1,
}

void main()
{
writefln(%s, Type.button);
writefln(%d, Type.button);
}
-

Prints:
button
1

However you can't use this trick for string enums since there's no equivalent
format specifier to retrieve an actual string.

There should be a way to always format the actual value of an enum in
writef/format calls. %s might try to do the convenient thing by default, so
maybe a new format specifier would be required? E.g. %e for enum values.

Alternatively one would write a helper template, e.g. toBaseValue(enumVal),
which would return the base type value of an enum:

-
import std.stdio;

enum Type : int
{
button = 1,
}

enum Type2 : string
{
button = ttk::button,
}

template EnumBaseType(E) if (is(E == enum))
{
static if (is(E B == enum))
alias EnumBaseType = B;
}

T toBaseType(E, T = EnumBaseType!E)(E val)
{
return cast(T)val;
}

void main()
{
writefln(%s %s, Type.button.toBaseType, Type2.button.toBaseType);
}
-

Prints:
1 ttk::button

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10811] Order dependent IFTI failure

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10811



--- Comment #2 from github-bugzi...@puremagic.com 2013-08-13 02:34:14 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/bf9676b0cf75c2e16c2f485e06eefd3fd0ee234b
Remove conflict template function

By fixing bug 10811, both toUTFz template functions will conflict on the call
`toUTFz!(T)(str)`. Remove one to resolve ambiguity.

https://github.com/D-Programming-Language/phobos/commit/82085781b0b18b4a799f0727e80aadb41b3369d5
Merge pull request #1473 from 9rnsr/fix10811

Supplemental fix for issue 10811 - Remove conflict template function

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10814] Formatting string-based enum prints its name instead of its value

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10814


rswhi...@googlemail.com changed:

   What|Removed |Added

 CC||rswhi...@googlemail.com


--- Comment #1 from rswhi...@googlemail.com 2013-08-13 02:39:18 PDT ---
Another Workaround:


import std.stdio;

enum Type : string
{
   button = type::button,
}

void main()
{
writeln( ~ Type.button);
}


prints:
type::button

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10809] [REG] darwin 32 dmd release broken

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10809


monarchdo...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10814] Formatting string-based enum prints its name instead of its value

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10814



--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-08-13 
03:56:19 PDT ---
(In reply to comment #1)
 Another Workaround:
 writeln( ~ Type.button);

Well, that might even allocate. I thought slicing could work too, but the
following doesn't compile:

writeln(Type.button[]);

Error: template std.stdio.writeln(T...)(T args) cannot deduce template function
from argument types !()(Type)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10804] regression(2.063=2.064) problem with Appender or dmd?

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10804


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

   What|Removed |Added

   Keywords||pull


--- Comment #2 from Kenji Hara k.hara...@gmail.com 2013-08-13 05:09:06 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2473

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 9220] module constructor breaks implicit linking with DLL

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9220


Martin Nowak c...@dawg.eu changed:

   What|Removed |Added

 CC||c...@dawg.eu


--- Comment #1 from Martin Nowak c...@dawg.eu 2013-08-13 05:05:52 PDT ---
Please avoid to hide bug information in attachments if possible.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10804] regression(2.063=2.064) problem with Appender or dmd?

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10804


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

   What|Removed |Added

   Keywords||wrong-code


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-08-13 05:08:37 PDT ---
This regression is caused by recent Appender change:
https://github.com/D-Programming-Language/phobos/commit/4da1639c98cb73d07858b17c2d225063889e4700
, but essentialy this is a dmd bug.

Reduced case:

string identity(string a) { return a; }
string fun()
{
char[] s;
s.length = 14;
s[0 .. 14] = identity(`Ω`)[];
return cast(string)s;
}

void main()
{
enum a1 = identity(`Ω`);
enum a2 = fun();// fun() returns a string which originally mutable
array
static assert(cast(ubyte[])mixin(a1) == [0xCE, 0xA9]);
static assert(cast(ubyte[])mixin(a2) == [0xCE, 0xA9]);  // fails!
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10815] New: Allow access of a symbol in a template instance if instantiator module has access to the symbol

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10815

   Summary: Allow access of a symbol in a template instance if
instantiator module has access to the symbol
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-08-13 
05:13:21 PDT ---
Currently the compiler disallows the following:

-
module test;
import std.algorithm;

private int foo(int input) { return input; }
package int bar(int input) { return input; }

void main()
{
map!foo([1, 2, 3]);
map!bar([1, 2, 3]);
}
-

C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(410): Error:
function test.foo is not accessible from module algorithm
C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(410): Error:
function test.bar is not accessible from module algorithm

The 'test' module explicitly passed a function that this module has access to,
which should effectively give access of this function symbol to the
instantiated template.

I propose we allow the instantiated template to get access to the passed symbol
if it's passed via an alias symbol, and if the module that instantiates the
template has access to this symbol. 

Note that it is already possible to pass private functions via a pointer:

-
module test;

import bar;

private void func() { }

void main()
{
call(func);
}
-

-
module bar;

void call(void function() func) { func(); }
-

This compiles. But with the relaxed access rule so should this (which currently
doesn't compile):

-
module test;

import bar;

private void func() { }

void main()
{
call!func();
}
-

-
module bar;

void call(alias func)() { func(); }
-

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10813] ICE(DMD2.063) template.c:6040: Identifier* TemplateInstance::genIdent(Objects*): Assertion `global.errors' failed

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10813


monkeywork...@hotmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10791] Strange asm behavior in if's

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10791


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-08-13 05:16:44 PDT ---
http://dlang.org/statement.html

Statement:
  NonEmptyStatement

NonEmptyStatement:
  NonEmptyStatementNoCaseNoDefault

NonEmptyStatementNoCaseNoDefault:
  AsmStatement

AsmStatement:
  asm { }
  asm { AsmInstructionList }

AsmStatement does not take semicolon at the end, then

if(1)
asm {};
else
asm {};

is mostly same as:

if (1) { asm {} }
;
else { asm {} }
;

and the 'else' part is stray.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 9220] module constructor breaks implicit linking with DLL

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9220



--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-08-13 
05:48:28 PDT ---
What do you mean hide?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10729] Some exception symbols undefined

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10729



--- Comment #9 from Nils nilsboss...@googlemail.com 2013-08-13 06:23:37 PDT 
---
(In reply to comment #4)
  Maybe you are still link old phobos.lib (2.063 or earlier). After git head
  rebuild, you would forgot to place the generated phobos.lib (in
  dmd2\src\phobos\) on correct lib path (dmd2\windows\lib\phobos.lib by 
  default).
 
 I don't think so. Every time I finished rebuilding druntime and phobos, I
 always copy the new druntime.lib and phobos.lib into my dmd directory,
 replacing the old ones.
 
 Anyway, I just repeated the compilation process, just to make sure. Here's the
 screencast of it:
 http://youtu.be/Fu1P0HGkZXA

In the video, you don't copy phobos.lib over:
http://www.youtube.com/watch?v=Fu1P0HGkZXAt=1m56s

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10729] Some exception symbols undefined

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10729



--- Comment #10 from Nils nilsboss...@googlemail.com 2013-08-13 06:27:46 PDT 
---
(In reply to comment #9)
 In the video, you don't copy phobos.lib over:
 http://www.youtube.com/watch?v=Fu1P0HGkZXAt=1m56s

Forget about that, I got confused. You're doing make, make clean, make, copy.
So, in the end you should be fine.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10815] Allow access of a symbol in a template instance if instantiator module has access to the symbol

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10815


Dicebot pub...@dicebot.lv changed:

   What|Removed |Added

 CC||pub...@dicebot.lv


--- Comment #1 from Dicebot pub...@dicebot.lv 2013-08-13 06:36:12 PDT ---
I have always thought it is intentional:

TemplateInstantances are always performed in the scope of where the
TemplateDeclaration is declared, with the addition of the template parameters
being declared as aliases for their deduced types.

(http://dlang.org/template.html)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 9220] module constructor breaks implicit linking with DLL

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9220


Martin Nowak c...@dawg.eu changed:

   What|Removed |Added

 OS/Version|All |Windows


--- Comment #3 from Martin Nowak c...@dawg.eu 2013-08-13 06:49:19 PDT ---
Everything is in a zip file which means I have to download and unpack it before
I know what this is about. This means less people are going to have a look at
this bug.
Also the bug information is not searchable.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10462] interface thunk doesn't preserve EBX

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10462


Martin Nowak c...@dawg.eu changed:

   What|Removed |Added

 CC||siegelords_ab...@yahoo.com


--- Comment #10 from Martin Nowak c...@dawg.eu 2013-08-13 06:55:04 PDT ---
*** Issue 10515 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10515] -shared -O -release -fPIC -m32 generates a broken library

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10515


Martin Nowak c...@dawg.eu changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||c...@dawg.eu
 Resolution||DUPLICATE


--- Comment #1 from Martin Nowak c...@dawg.eu 2013-08-13 06:55:04 PDT ---
*** This issue has been marked as a duplicate of issue 10462 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10816] New: Support for is(T1 != T2) syntax

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10816

   Summary: Support for is(T1 != T2) syntax
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2013-08-13 07:03:37 PDT ---
Created an attachment (id=1242)
Hundreds of usage cases found in dmd/Phobos

In Phobos I have counted about 240 cases (even if some of them are possibly
false positives, see the attach) of usages of the pattern:

!is(T1 == T2)

So I suggest to add to D a handy syntax like this (that in past sometimes I
even have used by mistake):

is(T1 != T2)

It's similar to the handy !is and !in syntaxes.

- - - - - - - - - - - - - - - - - -

Extra: in some cases you can even think about a comparison, but this is left to
other enhancement requests:

class Klass1 {}
class Klass2 : Klass1 {}
enum bool b1 = is(Klass1  Klass2);

alias T1 = Tuple!(int, x);
alias T2 = Tuple!(int);
enum bool b2 = is(T1  T2);

--

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10817] New: Linker error with postcondition contract in a release library

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10817

   Summary: Linker error with postcondition contract in a release
library
   Product: D
   Version: D1  D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: david.ecka...@sociomantic.com


--- Comment #0 from David Eckardt david.ecka...@sociomantic.com 2013-08-13 
07:14:27 PDT ---


// Module in a library, compiled with -release
module a;

class A
{
int f ( )
out (x){assert(x);}
body {return 1;}
}



// User code, compiled without -release
module b;

import a;

class B: A
{
override int f ( ) {return super.f();}
}

int main ( )
{
return (new B).f();
}



$ dmd -lib -release a.d
$ dmd b.d -La.a
b.o: In function `_D1b1B1fMFZi':
b.d:(.text._D1b1B1fMFZi+0x60): undefined reference to
`_D1a1A1fMFZi8__ensureMFKiZv'

Apparently B.f() references the postcondition of A.f(), which it overrides, but
that is omitted because A is compiled with -release.
This is very unfortunate as it can make it impossible to use a library that is
compiled with -release.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10817] Linker error with postcondition contract in a release library

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10817


David Eckardt david.ecka...@sociomantic.com changed:

   What|Removed |Added

   Keywords||contracts, industry,
   ||link-failure


--- Comment #1 from David Eckardt david.ecka...@sociomantic.com 2013-08-13 
07:18:50 PDT ---
The industry in this case is sociomantic.com.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10816] Support for is(T1 != T2) syntax

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10816


timon.g...@gmx.ch changed:

   What|Removed |Added

 CC||timon.g...@gmx.ch


--- Comment #1 from timon.g...@gmx.ch 2013-08-13 07:29:42 PDT ---
What is the meaning of is(T1!=T2) ?

Is it

!is(T1==T2)

or

is(T1)  !is(T1==T2)

IMO the way to go is to use T1==T2 and T1!=T2. (In this case, both T1 and T2
should be valid types.)

---

Extra: What would be the difference to is(T1:T2) ? I think this would again
make more sense without 'is': T1T2.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10816] Support for is(T1 != T2) syntax

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10816


Dicebot pub...@dicebot.lv changed:

   What|Removed |Added

 CC||pub...@dicebot.lv


--- Comment #2 from Dicebot pub...@dicebot.lv 2013-08-13 08:49:44 PDT ---
I like the idea. Both because of consistency and because that '!' near to 'i'
is so hard to notice.

@Timon

I don't think is(T1)  !is(T1==T2) is any useful. It will make is(T1 != T2)
return false for invalid T1 which is rather surprising. I can't imagine the use
case for it.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10818] New: Allow parameterized enum declaration

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10818

   Summary: Allow parameterized enum declaration
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara k.hara...@gmail.com 2013-08-13 08:49:37 PDT ---
Aggregate declarations could have optional template parameters.

class C1 {}
class C2(T) {}

interface I1 {}
interface I2(T) {}

struct S1 {}
struct S2(T) {}

union U1 {}
union U2(T) {}

Similarly, parameterized enum declaration would increase language consistency.

enum E1 {}
enum E2(T) {}
enum E2(T) if (constraint) {}
enum E2(T) : T {}
enum E2(T) if (constraint) : T {}
enum E2(T) : T if (constraint) {}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10816] Support for is(T1 != T2) syntax

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10816



--- Comment #3 from timon.g...@gmx.ch 2013-08-13 09:01:05 PDT ---
(In reply to comment #2)
 I like the idea. Both because of consistency and because that '!' near to 'i'
 is so hard to notice.
 
 @Timon
 
 I don't think is(T1)  !is(T1==T2) is any useful. It will make is(T1 != 
 T2)
 return false for invalid T1 which is rather surprising. I can't imagine the 
 use
 case for it.

Are you aware that is(T1==T2) gives false for invalid T1 and error for invalid
T2?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10816] Support for is(T1 != T2) syntax

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10816



--- Comment #4 from Dicebot pub...@dicebot.lv 2013-08-13 09:07:06 PDT ---
(In reply to comment #3)
 Are you aware that is(T1==T2) gives false for invalid T1 and error for invalid
 T2?

Was aware about the former, not about the latter.

But I don't see how it is relevant. When i compare types via is(T1 == T2),
information that matters is are those two the same?. It does not matter why
are they not the same. Same goes for is(T1 != T2), but other way around - are
those types not the same?

Making !is(T1 != T2) != is(T1 == T2) breaks common sense quite a lot in my
opinion.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10818] Allow parameterized enum declaration

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10818


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

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-08-13 09:17:14 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2474

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10816] Support for is(T1 != T2) syntax

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10816



--- Comment #5 from bearophile_h...@eml.cc 2013-08-13 09:36:29 PDT ---
(In reply to comment #1)

 What is the meaning of is(T1!=T2) ?
 
 Is it
 
 !is(T1==T2)
 
 or
 
 is(T1)  !is(T1==T2)

The most important use case is to test if two already existing types differ.


 IMO the way to go is to use T1==T2 and T1!=T2. (In this case, both T1 and T2
 should be valid types.)

I agree. But I think this is for another enhancement request. Do you want to
open it?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 1116] std.intrinsic still missing rotate

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1116


hst...@quickfur.ath.cx changed:

   What|Removed |Added

 CC||hst...@quickfur.ath.cx


--- Comment #4 from hst...@quickfur.ath.cx 2013-08-13 09:42:49 PDT ---
Related issue #6829.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6829] Unsigned rotate standard function in Phobos

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6829



--- Comment #41 from hst...@quickfur.ath.cx 2013-08-13 09:42:34 PDT ---
Related: issue #1116.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6210] Associative array with array key often cannot be equated.

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6210



--- Comment #3 from hst...@quickfur.ath.cx 2013-08-13 10:30:34 PDT ---
Argh, this is caused by the stupidity of typeid(const(char)[]) using a
different hash function from typeid(char[]) and typeid(immutable(char)[]). Will
submit a pull for this.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10791] Strange asm behavior in if's

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10791



--- Comment #2 from Temtaime temta...@gmail.com 2013-08-13 10:51:48 PDT ---
Why asm statement doesn't follow common rules?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10791] Strange asm behavior in if's

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10791


Maxim Fomin ma...@maxim-fomin.ru changed:

   What|Removed |Added

 CC||ma...@maxim-fomin.ru


--- Comment #3 from Maxim Fomin ma...@maxim-fomin.ru 2013-08-13 11:05:42 PDT 
---
(In reply to comment #2)
 Why asm statement doesn't follow common rules?

One reason is because although AsmStatement is formally a statement, it is
actually close to a BlockStatement (AsmInstruction is close to regular
statement) and BlockStatements don't have ; after them (like aggregate type
declarations and enum declarations).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6829] Unsigned rotate standard function in Phobos

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6829



--- Comment #43 from bearophile_h...@eml.cc 2013-08-13 11:20:41 PDT ---
(In reply to comment #42)
 Guys, please, fix the bugs, not improve performance of DMD's backend.
 For that purpose there are LDC and GDC.

Walter is free to do what he likes with his time, including enhancing the DMD
back-end. And currently LDC2 back-end is not optimizing the rotations well
enough. I now think that having two rotation intrinsics is a good solution.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10815] Allow access of a symbol in a template instance if instantiator module has access to the symbol

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10815



--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-08-13 
11:43:44 PDT ---
Well it may be intentional, but it makes many Phobos functions unusable with
internal library routines.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 9220] module constructor breaks implicit linking with DLL

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9220



--- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-08-13 
11:42:36 PDT ---
(In reply to comment #3)
 Everything is in a zip file which means I have to download and unpack it 
 before
 I know what this is about. This means less people are going to have a look at
 this bug.
 Also the bug information is not searchable.

Well the bug report is simple, it's all in the title. I've zipped the package
because it's multiple modules, and it's easier for people to unzip and run
rather then to have to manually copy and paste code sections embedded in a
single comment.

If bugzilla had a add source files option, it would be better. (maybe some
newer version of bugzilla has this..?)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6829] Unsigned rotate standard function in Phobos

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6829



--- Comment #44 from Iain Buclaw ibuc...@ubuntu.com 2013-08-13 12:05:05 PDT 
---
(In reply to comment #42)
 Guys, please, fix the bugs, not improve performance of DMD's backend.
 For that purpose there are LDC and GDC.

Intrinsics benefits GDC code generation also...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10819] New: Invalid comparison for equality of lambda functions

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10819

   Summary: Invalid comparison for equality of lambda functions
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: and...@erdani.com


--- Comment #0 from Andrei Alexandrescu and...@erdani.com 2013-08-13 17:48:14 
PDT ---
Consider:

void main() {
import std.range;
SortedRange!(int[], a  b) a;
SortedRange!(int[], a  b) b;
b = a;
SortedRange!(int[], (a, b) = a  b) c;
SortedRange!(int[], (a, b) = a  b) d;
d = c;
}

The last line does not compile.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10716] Horrifically slow compilation for array literals inside functions

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10716



--- Comment #3 from github-bugzi...@puremagic.com 2013-08-13 18:08:56 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9c97ebe61f85fef25bab8ff3d310a78fb56e38ba
fix Issue 10716 - Horrifically slow compilation for array literals inside
functions

https://github.com/D-Programming-Language/dmd/commit/c9235a9ce3dc0e8dc97b4b9a9c8b83a31950e8f8
Merge pull request #2388 from WalterBright/fix10716

fix Issue 10716 - Horrifically slow compilation for array literals insid...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7438] Functions from std.conv should be pure

2013-08-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7438



--- Comment #6 from Jonathan M Davis jmdavisp...@gmx.com 2013-08-13 19:47:19 
PDT ---
Whether std.conv.to can be @safe or pure depends entirely on what you're
converting. For all of the built-in types, it should be @safe and pure, but
once user-defined types enter the mix, it depends on how the user-defined types
are defined. A lot of the underlying stuff which relates to arrays (like
appender) hasn't been able to be pure in the past (I don't know quite where
that sits now though), making it so that stuff like std.conv.to!string(10)
hasn't been able to be pure even though it should be. So, odds are that the
lack of purity or @safety in std.conv.to isn't std.conv.to's fault at all.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---