[Issue 7176] Lambda = syntax for function and methods too

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7176


Jacob Carlborg d...@me.com changed:

   What|Removed |Added

 CC||d...@me.com


--- Comment #7 from Jacob Carlborg d...@me.com 2012-01-03 23:30:48 PST ---
I could really have a use for this. I have a lot of methods that just returns a
single expression.

Another idea would be to allow optional braces for methods and functions, just
as for if-statements. This could be extended to all language features where
braces are used to make it more consistent.

In addition to the above we could make implicit returns possible to all
functions and methods.

I don't know which of these two ideas are farthest away from the normal C-based
syntax.

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


[Issue 7216] New: [CTFE] Can't call struct member function using pointer field

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7216

   Summary: [CTFE] Can't call struct member function using pointer
field
   Product: D
   Version: D1  D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: verylonglogin@gmail.com


--- Comment #0 from Denis verylonglogin@gmail.com 2012-01-04 10:51:19 MSK 
---
---
struct S {
S* ptr;
int t;  // no errors if `t` is commented

void f() { }
}

int f() {
S s0, s1;
s0.ptr = s1;
s0.ptr.f(); // Error: couldn't find field ptr of type S in S(s1,0)
return 0;
}

void main() {
enum e = f();
}
---

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


[Issue 7217] New: Regression(head 7c839960): [CTFE] ICE on accesing struct array field

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7217

   Summary: Regression(head 7c839960): [CTFE] ICE on accesing
struct array field
   Product: D
   Version: D1  D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Keywords: ice-on-valid-code
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: verylonglogin@gmail.com


--- Comment #0 from Denis verylonglogin@gmail.com 2012-01-04 11:22:00 MSK 
---
It compiles with dmd 2.057. But with head commit (7c839960):
Assertion failure: '((StructLiteralExp *)newval)-ownedByCtfe' on line 6281 in
file 'interpret.c'
---
struct S { int[] arr; }

int f() {
auto s = S();
auto t = s.arr;
return 0;
}

enum e = f();
---

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


[Issue 7223] New: Access violation when using rmdirRecurse on folder without modify permissions

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7223

   Summary: Access violation when using rmdirRecurse on folder
without modify permissions
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: jesse.k.phillip...@gmail.com


--- Comment #0 from Jesse Phillips jesse.k.phillip...@gmail.com 2012-01-04 
13:54:27 PST ---
On Windows if you do not have permissions to modify a folder (i.e. delete it)
then the program will crash with an Access Violation instead of throwing a
FileException. I tried adding writeln statements to try and narrow down the
code and instead I end up with an infinite loop. Interesting bits below.

=== Bypassed ===
std.file.FileException@std\file.d(551): C:\New folder\New Text Document.txt:
Acc
ess is denied.

436098
435F0F
403296
402125
402042
4027C8
40280C
402403
4BF2E5

object.Error: Access Violation

436098
435F0F
402042
4027C8
40280C
402403
4BF2E5

Bypasses std.file.FileException@std\file.d(551)
object.Error: Access Violation

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


[Issue 7117] Regression(2.057, 1.072): out contract for class member functions are broken

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7117



--- Comment #5 from Vladimir Panteleev thecybersha...@gmail.com 2012-01-04 
14:03:39 PST ---
From git bisect's man page:

 The special exit code 125 should be used when the current source code cannot 
 be tested. If the script exits with this code, the current revision will be 
 skipped (see git bisect skip above).

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


[Issue 7224] New: Throwing precondition of nothrow function

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7224

   Summary: Throwing precondition of nothrow function
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: accepts-invalid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-01-04 14:14:10 PST ---
This function compiles with no errors with DMD 2.058head:


bool foo() {
throw new Exception();
}
void main() nothrow
in {
assert(foo());
} body {}


but main() raises an exception (main() doesn't raise an exception in release
mode).
I think this is a problem.

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


[Issue 7225] New: immutable argument by const ref

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7225

   Summary: immutable argument by const ref
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-01-04 14:15:07 PST ---
In this program:
- a1 gives no errors and this is correct;
- a2 gives an error, and I think this is correct;
- a3 too gives an error, and I think this is not correct, because it not a
manifest constant:


void foo(const ref int[2] M) {}
void main() {
const int[2] a1 = [1, 2];
foo(a1);
enum int[2] a2 = [1, 2]; // line 5
foo(a2);
immutable int[2] a3 = [1, 2];
foo(a3);
}


DMD 2.058head gives:

test.d(6): Error: function test.foo (ref const(int[2u]) M) is not callable
using argument types (int[2u])
test.d(5): Error: [1,2] is not an lvalue
test.d(8): Error: cast(const(int[2u]))a3 is not an lvalue

The first two error messages are not good, I think they should be merged in a
single more clear error message relative to just line 6.


A similar program that uses just ints:

void foo(const ref int M) {}
void main() {
const int a1 = 1;
foo(a1);
enum int a2 = 1;
foo(a2);
immutable int a3 = 1;
foo(a3);
}


DMD 2.058head gives:

test.d(6): Error: function test3.foo (ref const(int) M) is not callable using
argument types (int)
test.d(5): Error: constant 1 is not an lvalue
test.d(8): Error: constant 1 is not an lvalue

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


[Issue 7226] New: Refused pure nothrow ctor syntax

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7226

   Summary: Refused pure nothrow ctor syntax
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-01-04 14:16:06 PST ---
I think this is a parser issue:


struct Foo {
static this() pure nothrow {}
}
void main() {}


DMD 2.058head gives:

test.d(2): semicolon expected following function declaration

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

A different case:

struct Foo {
static pure this() {}
}
void main() {}


DMD 2.058head gives:

test.d(2): Error: constructor test.Foo.this default constructor for structs
only allowed with @disable and no body

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


[Issue 7219] New: valid overrides with type qualifiers rejected

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7219

   Summary: valid overrides with type qualifiers rejected
   Product: D
   Version: D2
  Platform: Other
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2012-01-04 09:30:04 PST ---
With DMD 2.057, all three overrides fail:

class A{
void foo(immutable(int)[] x){}
immutable(int)[] bar(immutable(int)[] x){return x;}
immutable(int) qux(immutable(int) y){return y;}
}
class B: A{
override void foo(const(int)[] x){}
override inout(int)[] bar(inout(int)[] x){return x;}
override int qux(int y){return y;}
}

The code should compile.

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


[Issue 4549] D2 Language Docs: http://www.digitalmars.com/d/2.0/expression.html

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4549



--- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
09:33:14 PST ---
https://github.com/D-Programming-Language/d-programming-language.org/pull/52

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


[Issue 4560] D2 Language Docs: http://www.digitalmars.com/d/2.0/const3.html

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4560


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
10:15:32 PST ---
Fixed ages ago.

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


[Issue 7220] New: Bad initialization when using mixin to generate a static field in a -lib'rary

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7220

   Summary: Bad initialization when using mixin to generate a
static field in a -lib'rary
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Severity: critical
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: xtzgzo...@gmail.com


--- Comment #0 from Alex R�nne Petersen xtzgzo...@gmail.com 2012-01-04 
10:17:29 PST ---
main.d:

module main;

import std.stdio,
   faulty;

static this()
{
writefln(Faulty.instance: %s, Faulty.instance);
}

private int main(string[] args)
{
writeln(Main);
return 0;
}

faulty.d:

module faulty;

import std.stdio;

private mixin template DefineCoreType(string type)
{
mixin(public final class  ~ type ~
  { ~
  private static  ~ type ~  _instance; ~
   ~
  @property public static  ~ type ~  instance() ~
  { ~
  writeln(\accessing  ~ type ~ .instance()\);~
  return _instance;  ~
  } ~
   ~
  static this() ~
  { ~
  writeln(\initializing  ~ type ~._instance\);~
  _instance = new  ~ type ~ (); ~
  } ~
   ~
  });
}

mixin DefineCoreType!(Faulty);

Compile with:

dmd -lib faulty.d
dmd main.d faulty.lib

Run the resulting main.exe, and you'll see this output:

accessing Faulty.instance()
Faulty.instance: null
initializing Faulty._instance
Main

but the expected output is:

initializing Faulty._instance
accessing Faulty.instance()
Faulty.instance: faulty.DefineCoreType!(Faulty).Faulty
Main

The error does not occur if faulty.d is not compiled as a -lib'rary (i.e.
compiled directly into the executable), or if you unroll the mixin so faulty.d
becomes like so:

module faulty;

import std.stdio;

// this works properly!

public final class Faulty
{
private static Faulty _instance;

@property public static Faulty instance()
{
writeln(accessing Faulty.instance());
return _instance;
}

static this()
{
writeln(initializing Faulty._instance);
_instance = new Faulty();
}
}

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


[Issue 7227] New: [] syntax for empty associative array too?

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7227

   Summary: [] syntax for empty associative array too?
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: rejects-valid
  Severity: minor
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-01-04 14:37:27 PST ---
void foo(int[int] bb) {}
void main() {
int[int] aa;
aa = null; // OK
foo(null); // OK
aa = [];   // Error
foo([]);   // Error
}



DMD 2.058head gives:

test.d(6): Error: cannot implicitly convert expression ([]) of type void[] to
int[int]
test.d(7): Error: function test2.foo (int[int] bb) is not callable using
argument types (void[])
test.d(7): Error: cannot implicitly convert expression ([]) of type void[] to
int[int]

I am not sure, but maybe the second syntax too should be accepted.


An alternative syntax for empty associative array literal:

void foo(int[int] bb) {}
void main() {
int[int] aa;
aa = [:];
foo([:]);
}

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


[Issue 7117] Regression(2.057, 1.072): out contract for class member functions are broken

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7117



--- Comment #6 from Leandro Lucarella llu...@gmail.com 2012-01-04 14:38:08 
PST ---
(In reply to comment #5)
 From git bisect's man page:
 
  The special exit code 125 should be used when the current source code 
  cannot be tested. If the script exits with this code, the current revision 
  will be skipped (see git bisect skip above).

Nice! I didn't know that. Thanks!

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


[Issue 6205] Strongly-pure nothrow functions with ignored return value are entirely stripped even if it contains a failing 'assert'.

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6205



--- Comment #4 from Kenji Hara k.hara...@gmail.com 2012-01-04 03:07:56 PST ---
I think this is 'too early optimization' bug.

Mechanism:
1. The calling of a function that is strong-pure and nothrow is 'no side
effect'.
   Then dmd marks it in IR level.

   https://github.com/D-Programming-Language/dmd/blob/master/src/e2ir.c#L286

2. OPucallns and OPcallns are completely removed in backend optimizer level.

   
https://github.com/D-Programming-Language/dmd/blob/master/src/backend/cgelem.c#L4088

   
https://github.com/D-Programming-Language/dmd/blob/master/src/backend/cgelem.c#L4385

The mistaken is in #1. assert() has 'implicit side effect' (throw AssertError,
or halt), so all of function call with enabling assertion should disable
'remove no side effect calling' optimization.

At least, a compilation without -O switch should not remove such calls.

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


[Issue 4563] [module system] Error messages for missing package or missing name

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4563



--- Comment #4 from bearophile_h...@eml.cc 2012-01-04 03:11:27 PST ---
The situation is not improved.

Wrong D2 code:


import core.stdc.stdlib: puts;
import std.stdio: reverse;
void main() {
puts(hello);
int[] a = [1, 2, 3];
reverse(a);
}



After the recent changes in import semantics DMD 2.058head gives:

test.d(4): Error: undefined identifier puts
test.d(6): Error: undefined identifier reverse

But instead of such errors at the usage point I suggest to give import errors,
something like:

test.d(1): Error: name 'puts' not present in 'core.stdc.stdlib' module.
test.d(2): Error: name 'reverse' not present in 'std.stdio' module.

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


[Issue 6205] Strongly-pure nothrow functions with ignored return value are entirely stripped even if it contains a failing 'assert'.

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6205


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

   What|Removed |Added

   Keywords||patch


--- Comment #5 from Kenji Hara k.hara...@gmail.com 2012-01-04 04:24:59 PST ---
https://github.com/D-Programming-Language/dmd/pull/607

Only `-O -release` specification ignite the optimization.

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


[Issue 7117] Regression(2.057, 1.072): out contract for class member functions are broken

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7117



--- Comment #3 from Don clugd...@yahoo.com.au 2012-01-04 05:54:59 PST ---
(In reply to comment #2)
 (In reply to comment #0)
  I tried to do a git bisect to come up with the exact commit that broke this 
  but
  it was impossible because there are commits that doesn't compile.
 
 git bisect skip should help in such situations.

Not in this case. Almost every commit was broken.

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


[Issue 7035] Please use instead broken documentation

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7035


Andrej Mitrovic andrej.mitrov...@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 6996] std.typecons calls writeln without importing std.stdio

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6996


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
06:42:05 PST ---
Seems to be fixed in 2.057.

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


[Issue 6821] core.exception.OutOfMemoryError on dtor field test of class-embedded struct

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6821


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


--- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
06:44:01 PST ---
I think it's ok to close this, this is a GC implementation issue and is not
necessarily a bug.

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


[Issue 6605] Add switch to enable setting library search paths via command line

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6605


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


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


[Issue 6768] Problem with init of struct members in presence of templated opAssign

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6768



--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
06:49:54 PST ---
In 2.057 all calls to the `dg` delegate print garbage values if the templated
opAssign was used:

Point: Point(4202703, 4931824, void delegate())
Point: Point(1244728, 4202612, void delegate())
Point: Point(4202726, 4931824, void delegate())

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


[Issue 6732] ICE: __traits(compiles) fails on valid expression

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6732


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

   Keywords|rejects-valid   |
Summary|__traits(compiles) fails on |ICE: __traits(compiles)
   |valid expression|fails on valid expression


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
06:55:23 PST ---
The following has now turned into an ICE (is a crash equivalent to an ICE?) in
2.057:

template isDouble(T) 
{
enum bool isDouble = __traits(hasMember, T, x);
}

void test(T)(T rhs) if (isDouble!T) { }

void main() 
{
test(4.5);
}

---
dmd.exe - Application Error
---
The instruction at 0x00489e61 referenced memory at 0x. The memory
could not be read.

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


[Issue 6821] core.exception.OutOfMemoryError on dtor field test of class-embedded struct

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6821


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

   What|Removed |Added

 CC||thecybersha...@gmail.com


--- Comment #5 from Vladimir Panteleev thecybersha...@gmail.com 2012-01-04 
06:56:21 PST ---
(In reply to comment #3)
 Because AssertError is an object, I understand. I think it was Vladimir who
 changed it to throw an exception, which is a good thing rather than have it
 corrupt memory.

Yup. The newer Druntime versions have a dedicated exception class for this
error (InvalidMemoryOperationError), which should be Google-able enough to
clear confusion regarding it.

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


[Issue 6710] Can't use .sizeof in pragma(msg) call

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6710



--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
06:56:49 PST ---
Workaround: Put the pragma call outside of the structure definition.

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


[Issue 6632] toUTFz sometimes does not work with const parameters

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6632


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


--- Comment #9 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
06:57:43 PST ---
Fixed in 2.057, thanks Jonathan.

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


[Issue 7101] Downloads Tools doesn't expand

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7101


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:03:16 PST ---
*** This issue has been marked as a duplicate of issue 6441 ***

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


[Issue 6441] Downloads Tools section is impossible to reach

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6441



--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:03:16 PST ---
*** Issue 7101 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 6456] toString fails with alias this when more than one field present

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6456


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:03:57 PST ---
Fixed in 2.057, but I don't know which pull fixed it.

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


[Issue 6364] Static struct's destructor called on exit of function

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6364



--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:07:56 PST ---
(In reply to comment #0)
To clarify: It should print 1 both times. I think the dtor should run on app
exit, since it's a static variable.

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


[Issue 6175] String corruption when passing static char arrays to std.conv

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6175



--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:17:05 PST ---
This has now changed to a template error:

import std.conv;

void main()
{
char[9] statCArr = blablabla;
auto res1 = to!(char[])(statCArr);
}

D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\conv.d(237): Error: template
std.conv.toImpl(T,S) if (isImplicitlyConvertible!(S,T)) toImpl(T,S) if
(isImplicitlyConvertible!(S,T)) matches more than one template declaration,
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\conv.d(245):toImpl(T,S) if
(isImplicitlyConvertible!(S,T)) and
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\conv.d(350):toImpl(T,S) if
(isStaticArray!(S))

A simple workaround is to pass a slice:
auto res1 = to!(char[])(statCArr[]);

But since to() seems to have specializations for static arrays I'll leave this
open.

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


[Issue 6021] std.net.isemail missing from dpl.org

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6021


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:23:01 PST ---
Fixed in 2.057, and probably an earlier release.

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


[Issue 6020] Dead link: http://d-programming-language.org/32-64-portability.html

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6020


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:23:34 PST ---
Fixed in 2.057 and earlier.

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


[Issue 5913] std.range.put broken sentence

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5913


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:25:31 PST ---
The docs for this function have changed, this is fixed.

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


[Issue 5460] enum of struct not calling constructor

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5460



--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:33:27 PST ---
The following has now changed into a CT error:

enum Sizes : Size {
Minimum = Size(10)
}

struct Size {
   int store;
}

void main()
{
}

test.d(4): Error: Integer constant expression expected instead of Size(10)
test.d(4): Error: Integer constant expression expected instead of Size(10)

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


[Issue 5358] std.functional: binaryReverseArgs toDelegate missing from documentation

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5358



--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:36:03 PST ---
toDelegate is now documented, but not binaryReverseArgs. I think it's just
missing an extra asterisk in its comment to make it ddoc'ed /* = /**

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


[Issue 4736] http://www.digitalmars.com/d/2.0/hash-map.html

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4736



--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:41:52 PST ---
https://github.com/D-Programming-Language/d-programming-language.org/pull/51

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


[Issue 4556] Wrong docs for nested functions

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4556


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

Summary|Misbehaving nested function |Wrong docs for nested
   ||functions


--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:47:14 PST ---
It's the docs that are outdated, changing title and will make a pull shortly.

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


[Issue 4562] D2 Language Docs: http://www.digitalmars.com/d/2.0/dbc.html

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4562


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
07:45:24 PST ---
This has turned into a CT error in 2.057 and probably earlier:

test.d(11): Error: function test.B.test cannot have an in contract when
overriden function test.A.test does not have an in contract

I think it's ok to close it then.

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


[Issue 7218] New: Nested function with contract is rejected

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7218

   Summary: Nested function with contract is rejected
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: rejects-valid
  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-01-04 08:26:00 PST ---
This code can't compile.

void main()
{
  size_t foo()   in{}   out{} body{ return 0; } // OK
  size_t bar() in{} /*out{}*/ body{ return 0; } // OK
  size_t hoo() /*in{}*/ out{} body{ return 0; } // NG1
  size_t baz() /*in{} out{}*/ body{ return 0; } // NG2
}

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


[Issue 7218] Nested function with contract is rejected

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7218


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

   What|Removed |Added

   Keywords||patch


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-01-04 08:31:25 PST ---
https://github.com/D-Programming-Language/dmd/pull/608

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


[Issue 4547] D2 Language Docs: http://www.digitalmars.com/d/2.0/property.html

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4547


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
08:47:28 PST ---
Fixed ages ago, forgot to close.

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


[Issue 5849] std.random.dice is better as a range

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5849


bearophile_h...@eml.cc changed:

   What|Removed |Added

   Attachment #1060|0   |1
is obsolete||


--- Comment #4 from bearophile_h...@eml.cc 2012-01-04 14:58:04 PST ---
Created an attachment (id=1066)
Version 0.5 of the fast dice

 You may want to package contributions as pull requests. Thanks!

Thank you. I think the current code is not yet fit for a pull request, there
are some things to be done/solved first:

- Create statistical unittests.
- Is popLast() overkill/not useful enough?
- Is the Range correct now?
- Is uint[] enough for mAlias?
- ddoc comments are missing still.
- Currently the Dice constructor lacks a pre-condition: I think the input
  probabilities must sum to 1.0. But is this necessary? An alternative
  design is to accept any array of numbers (integers too), and normalize
  their sum to 1.0 inside the Dice constructor itself.

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


[Issue 6157] to!string should work for various pointer types

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6157



--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
16:59:06 PST ---
Created an attachment (id=1067)
utf

Added implementation to be added to std.conv. These have to be further
verified.

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


[Issue 6157] to!string should work for various pointer types

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6157



--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-04 
17:00:31 PST ---
Btw, several people have asked for to!(char*)/to!(wchar*)/to!(dchar*) to work,
so I've added a simple template overload that forwards to toUTFz. Personally I
think this is a good convenience.

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


[Issue 7187] Regression(head 12d62ca5): [CTFE] ICE on slicing

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7187


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

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-01-04 
18:24:34 PST ---
https://github.com/D-Programming-Language/dmd/commit/51bc588d2e834650e5278247cd06b5da36569feb

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

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


[Issue 6933] Segfault(declaration.c) using struct with destructor in CTFE

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6933


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

   What|Removed |Added

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


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-01-04 
18:24:54 PST ---
https://github.com/D-Programming-Language/dmd/commit/51bc588d2e834650e5278247cd06b5da36569feb

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

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


[Issue 7185] [CTFE] ICE on changing char array length

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7185


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-04 
18:25:11 PST ---
https://github.com/D-Programming-Language/dmd/commit/51bc588d2e834650e5278247cd06b5da36569feb

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

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


[Issue 7194] [CTFE] Incorrect behaviour with pointers as local struct variable fields

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7194


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-04 
18:25:27 PST ---
https://github.com/D-Programming-Language/dmd/commit/51bc588d2e834650e5278247cd06b5da36569feb

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

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


[Issue 7228] New: MOVDQ2Q instruction is emitted with swapped register indices

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7228

   Summary: MOVDQ2Q instruction is emitted with swapped register
indices
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: psztur...@tlen.pl


--- Comment #0 from Piotr Szturmaj psztur...@tlen.pl 2012-01-04 21:03:48 PST 
---
With D's inline assembler, this instruction:

movdq2q MM2, XMM7;

is emitted as:

movdq2q MM7, XMM2;

I encountered this behaviour only with this instruction. Its reverse
instruction movq2dq is emitted correctly.

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


[Issue 6632] toUTFz sometimes does not work with const parameters

2012-01-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6632



--- Comment #10 from Jonathan M Davis jmdavisp...@gmx.com 2012-01-04 21:56:09 
PST ---
LOL. My fix actually hasn't been checked in yet. The changes to IFTI made it
completely unnecessary (and is why it works in 2.057). In fact, I just removed
my fix from the pull request for adding toUTF, since there's no reason to have
it anymore. The change to how IFTI deals with const and immutable arrays is
moste definitely a welcome one.

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