[Issue 7578] New: ICE on indexing result of vararg opDispatch

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7578

   Summary: ICE on indexing result of vararg opDispatch
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: d...@dawgfoto.de


--- Comment #0 from d...@dawgfoto.de 2012-02-25 02:32:32 PST ---
cat  bug.d  CODE
struct Foo
{
static int[] opDispatch(string op, Args...)(Args)
{
return [0];
}
}

void foo()
{
Foo.attrs[0] = 1;
}
CODE

dmd -c bug



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


[Issue 7579] New: disabled postblit called for array appending of Rvalues

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7579

   Summary: disabled postblit called for array appending of
Rvalues
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: d...@dawgfoto.de


--- Comment #0 from d...@dawgfoto.de 2012-02-25 02:54:27 PST ---
cat  bug.d  CODE
struct Foo
{
version (none)
@disable this(this);
else // linker error if undefined
@disable this(this) { assert(0); }
}

void main()
{
Foo[] foos;
foos ~= Foo(); // calls postblit
}
CODE

dmd -g bug

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


[Issue 7579] disabled postblit not checked for array appending

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7579


d...@dawgfoto.de changed:

   What|Removed |Added

Summary|disabled postblit called|disabled postblit not
   |for array appending of  |checked for array appending
   |Rvalues |


--- Comment #1 from d...@dawgfoto.de 2012-02-25 02:57:09 PST ---
Appending Lvalues will give the same result even though it should
be disabled.

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


[Issue 7580] New: Identity assignment of Nullable crashes dmd

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7580

   Summary: Identity assignment of Nullable crashes dmd
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara k.hara...@gmail.com 2012-02-25 04:34:30 PST ---
Following code compilation crashes dmd.

import std.typecons;
void main()
{
Nullable!(int, 0) ni;
ni = ni;
}

This is alias this issue that fallbacks to template member function.
Reduced test case:

struct S(T)
{
void opAssign()(T value) {}
}
struct X(T)
{
private T val;
@property ref inout(T) get()() inout { return val; }
alias get this;
}
void test()
{
S!(int) s;
X!int x;
s = x;
}

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


[Issue 7581] New: Compiler uses wrong instructions to move complex value from ST to xmm registers

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7581

   Summary: Compiler uses wrong instructions to move complex value
from ST to xmm registers
   Product: D
   Version: D1  D2
  Platform: x86_64
OS/Version: All
Status: NEW
  Keywords: wrong-code
  Severity: critical
  Priority: P2
 Component: DMD
AssignedTo: yebbl...@gmail.com
ReportedBy: yebbl...@gmail.com


--- Comment #0 from yebblies yebbl...@gmail.com 2012-02-25 23:43:17 EST ---
Both asserts should pass, but don't because dmd loads the nan onto the fp
stack, stores it into memory _as a double_, then loads it into the xmm
registers as a double and returns it.  The comparison code treats the xmm regs
as if they contain floats, giving the wrong result.

void main()
{
cfloat a() { return cfloat.nan; }
assert(a() != 0);
}

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


[Issue 7581] Compiler uses wrong instructions to move complex value from ST to xmm registers

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7581


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords||pull


--- Comment #1 from yebblies yebbl...@gmail.com 2012-02-26 00:24:54 EST ---
https://github.com/D-Programming-Language/dmd/pull/760

This is fixed by pull 760

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


[Issue 7582] New: Untyped nested delegate literals don't compile

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7582

   Summary: Untyped nested delegate literals don't compile
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: johnch_a...@hotmail.com


--- Comment #0 from johnch_a...@hotmail.com 2012-02-25 06:23:10 PST ---
Where the parameter type of nested delegate literals isn't specified, the
compiler outputs errors, as with the following code:

void main() {
  void delegate(int) foo;
  void delegate(int) foo2;
  foo = (a) {
foo2 = (b) {
};
  };
}

error : undefined identifier __T3, did you mean alias __T1?
error : cannot implicitly convert expression (__lambda4) of type _error_
function(_error_) to void delegate(int)
error : template instance program.main.__lambda2!(int) error instantiating

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


Re: setlocale not working as expected

2012-02-25 Thread John Chapman
On Friday, 24 February 2012 at 18:47:34 UTC, Jonathan M Davis 
wrote:

On Friday, February 24, 2012 08:10:31 Frank De prins wrote:

Hello,

When I use setlocale with LC_ALL it does not seem to work.
I use nlb_belgium and, when I print (writeln in console) a
floating point number, I expect the decimal separator to be a
comma. But it remains a dot.
When I use 0 instead of LC_ALL, it does work.
So I inspected the values defined for those locale cateory
constants and they seem to be completely different from what I
find in the Visual C++ headers. Is this possible? I mean, are
they not expected to be the same, or is this vendor specific?

PS: This is how they are defined in VC:

#define LC_ALL 0
#define LC_COLLATE 1
#define LC_CTYPE 2
#define LC_MONETARY 3
#define LC_NUMERIC 4
#define LC_TIME 5

Also, in VC++, the return value of setlocale is defined as 
char*

whereas, in D, it is int. This makes it impossible to inspect
the current locale.

Best regards and thanks for a wondderfull language,


This list is not intended to be posted to directly by anyone 
but bugzilla
itself. If you have a bug, please report it at 
d.puremagic.com/issues (in
which case, that would be messaged to this list). If you have a 
question about
learning D, then post to digitalmars-d-learn, and if you have a 
general D

question then, post it to digitalmars-d.

- Jonathan M Davis


Already reported as issue 5589 some time ago.
http://d.puremagic.com/issues/show_bug.cgi?id=5589


[Issue 7583] New: [CTFE] Pushing to Token array results in interpreter assert

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7583

   Summary: [CTFE] Pushing to Token array results in interpreter
assert
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: Linux
Status: NEW
  Keywords: CTFE, ice
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: an...@gmx.net


--- Comment #0 from an...@gmx.net 2012-02-25 06:44:17 PST ---
The following code results in a CTFE error. The bad line is array_of_tuples ~=
Tuple!(int, int)(0, 0);


import std.typecons;

void function_evaluated_at_compiletime() {
Tuple!(int, int)[] array_of_tuples;
array_of_tuples ~= Tuple!(int, int)(0, 0);
}

void main() {
mixin(function_evaluated_at_compiletime());
}


$ dmd main.d
dmd: interpret.c:94: Expression* CtfeStack::getValue(VarDeclaration*):
Assertion `v-ctfeAdrOnStack = 0  v-ctfeAdrOnStack  stackPointer()'
failed.
Aborted

DMD64 D Compiler v2.058

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


[Issue 7521] Add const inference for templated method and delegate parameters

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7521



--- Comment #2 from timon.g...@gmx.ch 2012-02-25 07:06:34 PST ---
This probably shouldn't be done for virtual functions of templated classes.

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


[Issue 7511] attribute inference does not work for methods of templated aggregates

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7511



--- Comment #3 from timon.g...@gmx.ch 2012-02-25 07:26:51 PST ---
This should probably not be done for virtual template class member functions.

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


[Issue 7580] Identity assignment of Nullable crashes dmd

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7580


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

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-02-25 09:03:29 PST ---
https://github.com/D-Programming-Language/dmd/pull/762

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


[Issue 7584] New: contract checking is too conservative for inherited contracts

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7584

   Summary: contract checking is too conservative for inherited
contracts
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2012-02-25 09:12:55 PST ---
Consider the following D program:

class Foo{
int foo(int x)in{
assert(x==0);
}out(result){
assert(result==0);
}body{
return 0;
}
}
class Bar: Foo{
override int foo(int x)in{
assert(x==1); // widen interface
}out(result){ // specify semantics
assert(result==x);
}body{
return x; // implementation for wider interface
}
}

void main(){
auto bar = new Bar;
bar.foo(1);
}


Bar clearly is a behavioral subtype of Foo, since Bar.foo does exactly the same
thing for the set of acceptable values of Foo.foo. Bar.foo furthermore has a
smart implementation the base class cannot possibly be aware of. This is
required so that Bar.foo can actually widen the interface and do the right
thing for all members of the larger set of input values. Everything is sound. 

With DMD 2.058, the program terminates with an assertion failure because it
fails the first 'out' contract. This is nonsensical.

Proposed enhancement:
The 'out' contract should only be checked if the corresponding 'in' contract
passes.
(Put differently, the condition that should be checked is that each passing
'in' contract implies the passing of its corresponding 'out' contract. An 'out'
contract does not need to pass if the corresponding 'in' contract fails.)

IIRC, this is how contract inheritance works in Spec#. Spec# is (ahead of)
state of the art in this area.

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


[Issue 7585] New: functions in templates inferred as delegate

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7585

   Summary: functions in templates inferred as delegate
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: simend...@gmail.com


--- Comment #0 from simendsjo simend...@gmail.com 2012-02-25 09:22:34 PST ---
extern(C) alias void function() Callback;

template Wrap(alias dg)
{
extern(C) void Wrap()
{
dg();
}
}

void main()
{
Callback cb = Wrap!( () {} );
}

Error: cannot implicitly convert expression (Wrap) of type void delegate()
pure nothrow @safe to extern (C) void function()

According to Timon Gehr: '() {}' should be inferred as void function()pure
nothrow @safe. http://forum.dlang.org/post/jib1a2$1jl5$1...@digitalmars.com

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


Linux DMD 2.058 shared library support still broken

2012-02-25 Thread Kris Dawson
2.058 can create a .so file when compiling with -fPIC and -shared but
when using 'nm -D' to see the addresses, the numbers are all over the
place. Linking a library  compiled with dmd to a test file doesn't
work with a ton of Phobos linking errors.


[Issue 7586] New: Equality lambda inference problem on tuples

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7586

   Summary: Equality lambda inference problem on tuples
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-02-25 10:08:07 PST ---
I am not sure what's the cause of this problem.


import std.algorithm, std.typecons;
alias Tuple!int T;
void main() {
const T del = T(1);
T[] items1 = [T(0), T(1), T(2)];
auto r1 = filter!(x = x != del)(items1); // OK
auto r2 = filter!(x = del != x)(items1); // error
const(T[]) items2 = [T(0), T(1), T(2)];
auto r3 = filter!(x = x != del)(items2); // error
}



test.d(7): Error: function
std.typecons.Tuple!(int).Tuple.opEquals!(Tuple!(int)).opEquals (Tuple!(int)
rhs) is not callable using argument types (Tuple!(int)) const
...\dmd2\src\phobos\std\algorithm.d(1089): Error: template instance
test.main.__lambda4!(Tuple!(int)) error instantiating
test.d(7):instantiated from here: filter!(Tuple!(int)[])
test.d(7): Error: template instance
test.main.filter!(__lambda4).filter!(Tuple!(int)[]) error instantiating
test.d(9): Error: function
std.typecons.Tuple!(int).Tuple.opEquals!(const(Tuple!(int))).opEquals
(const(Tuple!(int)) rhs) is not callable using argument types
(const(Tuple!(int))) const
...\dmd2\src\phobos\std\algorithm.d(1089): Error: template instance
test.main.__lambda6!(const(Tuple!(int))) error instantiating
test.d(9):instantiated from here: filter!(const(Tuple!(int))[])
test.d(9): Error: template instance
test.main.filter!(__lambda6).filter!(const(Tuple!(int))[]) error instantiating


If  x = x != del  works then I think  x = del != x  too should work.
The third case is a filter done on a const(Tuple!(int)[]), I think it's legit
code.

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


[Issue 7587] New: reduce() of a const array of tuples too

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7587

   Summary: reduce() of a const array of tuples too
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: enhancement
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-02-25 10:09:28 PST ---
import std.algorithm, std.typecons;
int add1(int x, int y) {
return x + y;
}
alias Tuple!int T;
T add2(T x, T y) {
return T(x[0] + y[0]);
}
void main() {
T[] items1 = [T(0), T(1)];
const t0 = T(0);
immutable r1 = reduce!add2(t0, items1); // OK
const(int[]) items2 = [0, 1];
const int zero = 0;
immutable r2 = reduce!add1(zero, items2); // OK
const(T[]) items3 = items1.idup;
immutable r3 = reduce!add2(t0, items3); // Error
}



DMD 2.059head gives:

...\dmd2\src\phobos\std\typecons.d(399): Error: template
std.typecons.Tuple!(int).Tuple.opAssign(R) if (isTuple!(R) 
allSatisfy!(isIdentityAssignable,Types)) does not match any function template
declaration
...\dmd2\src\phobos\std\typecons.d(399): Error: template
std.typecons.Tuple!(int).Tuple.opAssign(R) if (isTuple!(R) 
allSatisfy!(isIdentityAssignable,Types)) cannot deduce template function from
argument types !()(const(int))
...\dmd2\src\phobos\std\algorithm.d(702): Error: template instance
std.typecons.Tuple!(Tuple!(int)).Tuple.__ctor!(const(Tuple!(int))) error
instantiating
test.d(17):instantiated from here:
reduce!(const(Tuple!(int)),const(Tuple!(int)[]))
test.d(17): Error: template instance
std.algorithm.reduce!(add2).reduce!(const(Tuple!(int)),const(Tuple!(int)[]))
error instantiating


I think just as reduce works on an const(int[]) it should also work on an
const(Tuple!(int)[]).

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


[Issue 7588] New: Segfault with alias this and function templates

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7588

   Summary: Segfault with alias this and function templates
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: mrmoc...@gmx.de


--- Comment #0 from Trass3r mrmoc...@gmx.de 2012-02-25 19:31:43 CET ---
struct S
{
   int t(A...)(A a) { return 0; }
   alias t this;
}

int main()
{
   S s;
   return s;
}

$ gdb --args dmd test.d

Program received signal SIGSEGV, Segmentation fault.
0x004caee3 in TypeStruct::implicitConvTo(Type*) ()
(gdb) bt
#0  0x004caee3 in TypeStruct::implicitConvTo(Type*) ()
#1  0x0040c527 in Expression::implicitConvTo(Type*) ()
#2  0x0040c2fd in Expression::implicitCastTo(Scope*, Type*) ()
#3  0x004f3f0b in ReturnStatement::semantic(Scope*) ()
#4  0x004ec6a2 in CompoundStatement::semantic(Scope*) ()
#5  0x0048defc in FuncDeclaration::semantic3(Scope*) ()
#6  0x004ba294 in Module::semantic3() ()
#7  0x004b83b2 in main ()

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


[Issue 5964] std.stdio.readln can throw a UnicodeException

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5964


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

   What|Removed |Added

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


--- Comment #1 from hst...@quickfur.ath.cx 2012-02-25 11:04:58 PST ---
https://github.com/D-Programming-Language/phobos/pull/459

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


[Issue 5833] To read a key

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5833


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

   What|Removed |Added

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


--- Comment #2 from hst...@quickfur.ath.cx 2012-02-25 11:09:45 PST ---
This won't work on Unixen unless you also change the terminal mode to cbreak,
because otherwise the terminal doesn't even send the keypress until the end of
line.

But once you start enabling cbreak, then you have to worry about disabling it,
and you start to reinvent ncurses...

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


[Issue 6926] std.process.system return wrong exit code

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6926



--- Comment #2 from hst...@quickfur.ath.cx 2012-02-25 11:46:14 PST ---
https://github.com/D-Programming-Language/phobos/pull/460

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


[Issue 5964] std.stdio.readln can throw a UnicodeException

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5964



--- Comment #2 from github-bugzi...@puremagic.com 2012-02-25 12:06:15 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/4319df08143c0fa1f40f2d8c9935a056d96f8977
Fix docs for issue 5964.

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


[Issue 6826] stdio.File.readf docs incorrect

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6826


hst...@quickfur.ath.cx 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 5964] std.stdio.readln can throw a UnicodeException

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5964



--- Comment #3 from github-bugzi...@puremagic.com 2012-02-25 15:17:56 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/673403b5680c77a81b72ac426e80345e16d1db3e
Updated changelog for fix for issue# 5964.

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


[Issue 5964] std.stdio.readln can throw a UnicodeException

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5964


Jonathan M Davis jmdavisp...@gmx.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jmdavisp...@gmx.com
   Platform|Other   |All
 Resolution||FIXED
 OS/Version|Windows |All


--- Comment #3 from github-bugzi...@puremagic.com 2012-02-25 15:17:56 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/673403b5680c77a81b72ac426e80345e16d1db3e
Updated changelog for fix for issue# 5964.

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


[Issue 7580] Identity assignment of Nullable crashes dmd

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7580



--- Comment #2 from github-bugzi...@puremagic.com 2012-02-25 15:59:22 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9d24a9916f573bb78504ef9a642fd7747f282393
fix Issue 7580 - Identity assignment of Nullable crashes dmd

https://github.com/D-Programming-Language/dmd/commit/a03216f62665b8e04d2d67dc1b52dc3ec8826163
Merge pull request #762 from 9rnsr/fix7580

Issue 7580 - Identity assignment of Nullable crashes dmd

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


[Issue 7580] Identity assignment of Nullable crashes dmd

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7580


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


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


[Issue 7084] Missing writeln Unicode normalization

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7084


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

   What|Removed |Added

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


--- Comment #1 from hst...@quickfur.ath.cx 2012-02-25 17:57:14 PST ---
IMO this should be an enhancement request. As I understand, Unicode
normalization is non-trivial, so we probably should think over how we want to
do it.

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


[Issue 7588] Segfault with alias this and function templates

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7588


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||yebbl...@gmail.com


--- Comment #1 from yebblies yebbl...@gmail.com 2012-02-26 13:39:20 EST ---
Is this the same as issue 7580?

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


[Issue 7588] Segfault with alias this and function templates

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7588


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-02-25 18:44:07 PST ---
*** This issue has been marked as a duplicate of issue 7580 ***

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


[Issue 7580] Identity assignment of Nullable crashes dmd

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7580


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

   What|Removed |Added

 CC||mrmoc...@gmx.de


--- Comment #3 from Kenji Hara k.hara...@gmail.com 2012-02-25 18:44:07 PST ---
*** Issue 7588 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 7586] Equality lambda inference problem on tuples

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7586



--- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-02-25 20:01:34 PST ---
The root issue is bug 5783, and lambda inference isn't related.

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


[Issue 7585] functions in templates inferred as delegate

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7585



--- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-02-25 20:21:04 PST ---
The root cause is conservative escape analysis for nested template
instantiation.

extern(C) alias void function() Callback;

template Wrap(alias dg)
{
extern(C) void Wrap() { dg(); }
}

void f1(){}

void main()
{
static void f2(){}
void f3(){}

Callback cb1 = Wrap!(f1);  // OK
Callback cb2 = Wrap!(f2);  // OK
Callback cb3 = Wrap!(f3);  // NG
Callback cb3 = Wrap!((){});// NG
}

Current implementation always treats lambda literal as nested symbol.

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


[Issue 7578] ICE on indexing result of vararg opDispatch

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7578


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

   What|Removed |Added

   Keywords||ice, pull


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-02-25 20:41:06 PST ---
https://github.com/D-Programming-Language/dmd/pull/763

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


[Issue 7577] Delegate implicitly marked as system

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7577



--- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-02-25 21:24:01 PST ---
(In reply to comment #0)
 88
 import std.datetime;
 import std.stdio;
 
 struct A{
 
  auto fun(A a){ return 0; }
 }
 
 void bench(alias fun)(string msg, uint n = 1_000_000){
 
  auto b = benchmark!fun(n);
  writefln( %s %s ms, msg, b[0].to!(msecs, int));
 }
 
 unittest{
 
  A a, b;
 
  void test1(){
auto r = a.fun(b);
  }
 
  bench!( {auto r = a.fun(b);} )(Does Not work);
  bench!(test1)(Works);
 }
 
 void main(){ }
 88
 
 DMD 2.058, GNU/Linux 64-bit
 
 /usr/include/d/dmd/phobos/std/datetime.d(30986): Error: safe function
 'benchmark' cannot call system delegate '__lambda1'
 t1.d(11): Error: template instance
 t1.__unittest2.benchmark!(__lambda1) error instantiating
 t1.d(23):instantiated from here: bench!(delegate @system void()
 {
 int r = a.fun(b);
 }
 )
 t1.d(23): Error: template instance t1.__unittest2.bench!(delegate @system
 void()
 {
 int r = a.fun(b);
 }
 ) error instantiating


A.fun is not marked as @safe, so {auto r = a.fun(b);} inferred as @system.
Then delegate inference has no problem.

Additionally, std.datetime.benchmark requires that its arguments fun are @safe.
I don't know why that.

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


[Issue 7582] Untyped nested delegate literals don't compile

2012-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7582



--- Comment #1 from github-bugzi...@puremagic.com 2012-02-25 22:07:49 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/298c9453ebec4d0c48111b1214fcf02daf4234b3
fix Issue 7582 - Untyped nested delegate literals don't compile

https://github.com/D-Programming-Language/dmd/commit/e405aa01076a6fa58d11ef744ac09adb572b5d41
Merge pull request #764 from 9rnsr/fix7582

Issue 7582 - Untyped nested delegate literals don't compile

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