[Issue 9873] Built-in tuple should support equality comparison

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9873


Kenji Hara  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 6852] Cannot compare instances of ParameterStorageClassTuple

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6852


Kenji Hara  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
   Platform|Other   |All
 Resolution||FIXED
 OS/Version|Windows |All


--- Comment #2 from Kenji Hara  2013-04-04 22:13:37 PDT ---
(In reply to comment #0)
> What gives? ParameterTypeTuple doesn't suffer from these issues. It seems it's
> impossible to compare equality of storage classes between two functions. :s

ParameterStorageClassTuple makes a tuple of values, so

> alias ParameterStorageClassTuple Stores;
>
> static assert(Stores!(t1) == Stores!(t2)); // NG
> static assert(Stores!T1 == Stores!T2); // NG

value comparison would work, but

> static assert(is(Stores!t1 == Stores!t2)); // NG
> static assert(is(Stores!T1 == Stores!T2)); // NG

type comparison would not work.

>From 2.063, value tuple comparison would work by fixing issue 9873.

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


[Issue 9873] Built-in tuple should support equality comparison

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9873



--- Comment #5 from Kenji Hara  2013-04-04 22:08:40 PDT ---
*** Issue 9192 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 9192] Allow opEquals for .tupleof expressions

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9192


Kenji Hara  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #1 from Kenji Hara  2013-04-04 22:08:40 PDT ---
*** This issue has been marked as a duplicate of issue 9873 ***

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


[Issue 9880] Redundant template instance displaying in error message

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9880


Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara  2013-04-04 22:03:42 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1845

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


[Issue 9880] New: Redundant template instance displaying in error message

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9880

   Summary: Redundant template instance displaying in error
message
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: diagnostic
  Severity: minor
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara  2013-04-04 21:57:37 PDT ---
This invalid code:

void foo(T)(int) if (is(T == int)) {}
void main() { alias f = foo!string; }

Outputs:

test.d(2): Error: template instance foo!(string) foo!(string) does not match
template declaration foo(T)(int) if (is(T == int))


"foo!(string)" is displayed twice - it's redundant. Should be:

test.d(2): Error: template instance foo!(string) does not match template
declaration foo(T)(int) if (is(T == int))

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


[Issue 9879] Built-in sizeof should return ErrorExp if error occurs in aggregate type semantics

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9879


Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara  2013-04-04 21:19:38 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1843

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


[Issue 9879] New: Built-in sizeof should return ErrorExp if error occurs in aggregate type semantics

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9879

   Summary: Built-in sizeof should return ErrorExp if error occurs
in aggregate type semantics
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: diagnostic
  Severity: minor
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara  2013-04-04 21:12:54 PDT ---
>From bug 4269:

With this code, `__traits` should return `false`, but doesn't.

static if (__traits(compiles,A.sizeof)) pragma(msg, "A.sizeof compiles!");
class A { void foo(B b); }

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


[Issue 9873] Built-in tuple should support equality comparison

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9873



--- Comment #4 from github-bugzi...@puremagic.com 2013-04-04 20:41:15 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/7cd887634de72410535ee70a1f7255629122bd27
fix Issue 9873 - Built-in tuple should support equality comparison

https://github.com/D-Programming-Language/dmd/commit/0ae89aaf57506f02c43852ef7758dfcaf4c9095f
Merge pull request #1836 from 9rnsr/fix9873

Issue 9873 - Built-in tuple should support equality comparison

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


[Issue 9844] DMD (-m64) int long initialisation bug

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9844


Index Int  changed:

   What|Removed |Added

 CC||vlad.z.4...@gmail.com


--- Comment #6 from Index Int  2013-04-04 20:34:29 PDT 
---
The recent version of LDC (based on DMD v2.062 and LLVM 3.3svn) does not suffer
from this issue.

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


[Issue 9871] std.typecons.asArray

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9871


bearophile_h...@eml.cc changed:

   What|Removed |Added

Summary|std.typecons.asRange|std.typecons.asArray


--- Comment #2 from bearophile_h...@eml.cc 2013-04-04 20:10:52 PDT ---
With the latest version I think "asArray" is a better name.

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


[Issue 9878] New: std.algorithm.cartesianProduct results order

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9878

   Summary: std.algorithm.cartesianProduct results order
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: minor
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2013-04-04 19:48:53 PDT ---
This is an example of Python usage of its product() function:

>>> from itertools import product
>>> list(product([0, 1], repeat=3))
[(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1), (1, 0, 0), (1, 0, 1), (1, 1, 0),
(1, 1, 1)]



This is a similar usage of Phobos std.algorithm.cartesianProduct:


import std.stdio, std.algorithm, std.string, std.conv, std.array;
void main() {
auto bits = [0, 1];
auto p = cartesianProduct(bits, bits, bits);
p.text.replace("Tuple!(int, int, int)", "").writeln;
}


Its output:

[(0, 0, 0), (1, 0, 0), (0, 1, 0), (1, 1, 0), (0, 0, 1), (1, 0, 1), (0, 1, 1),
(1, 1, 1)]

I'd like cartesianProduct() to give its results in the same order as Python. If
you see in Python the results are like the binary numbers:

000
001
010
011
100
101
110
111

I think this is a more natural and more useful order.

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


[Issue 5937] Problem with map!delegate(iota(floating point))

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5937


bearophile_h...@eml.cc changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME


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


[Issue 9773] ref parameter with default value should not compile

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9773


Walter Bright  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 9844] DMD (-m64) int long initialisation bug

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9844



--- Comment #5 from safety0ff.b...@gmail.com 2013-04-04 13:54:00 PDT ---
Created an attachment (id=1206)
this kludge makes things work for me

This kludge makes things work for me.

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


[Issue 9773] ref parameter with default value should not compile

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9773



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

https://github.com/D-Programming-Language/dmd/commit/706b18758a63715aef4b1821e7b66b1d4e5ee467
fix Issue 9773 - ref parameter with default string literal should not compile

https://github.com/D-Programming-Language/dmd/commit/630e484c7e20cb156bf71404a342a8b98459cfde
Merge pull request #1829 from 9rnsr/fix9773

Issue 9773 - ref parameter with default string literal should not compile

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


[Issue 9872] format should include class field values

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9872



--- Comment #2 from Andrej Mitrovic  2013-04-04 
11:49:19 PDT ---
How's this for a funky workaround:

diff --git a/std/format.d b/std/format.d
index 8896e38..84169c0 100644
--- a/std/format.d
+++ b/std/format.d
@@ -2512,15 +2512,32 @@ if (is(T == class) && !is(T == enum))
 put(w, "null");
 else
 {
+Object o = val; // workaround
+string delegate() dg = &o.toString;
+
 static if (hasToString!(T, Char) > 1 || (!isInputRange!T &&
!is(BuiltinTypeOf!T)))
 {
-formatObject!(Writer, T, Char)(w, val, f);
+if (dg.funcptr != &Object.toString)
+formatObject!(Writer, T, Char)(w, val, f);
+else
+{
+enum ident = __traits(identifier, T);
+
+mixin(format(q{
+static struct %s
+{
+typeof(T.tupleof) fields;
+}
+%s s;
+s.fields = val.tupleof;
+}, ident, ident));
+
+formatValue(w, s, f);
+}
 }
 else
 {
   //string delegate() dg = &val.toString;
-Object o = val; // workaround
-string delegate() dg = &o.toString;
 if (dg.funcptr != &Object.toString) // toString is overridden
 {
 formatObject(w, val, f);

Yeah it's just a joke. But it works. :P

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


[Issue 9877] Assertion failure in iota for float parameters

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9877


Andrej Mitrovic  changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #1 from Andrej Mitrovic  2013-04-04 
11:26:10 PDT ---
Dupe of Issue 6531?

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


[Issue 9877] New: Assertion failure in iota for float parameters

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9877

   Summary: Assertion failure in iota for float parameters
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: acehr...@yahoo.com


--- Comment #0 from Ali Cehreli  2013-04-04 11:24:19 PDT ---
The following program asserts when compiled with -m32. (-m64 runs.)

import std.range;

void main()
{
float st = 0.000;
float step = 12.038554191589355;
float en = 999.200012207031250;

iota(st, en, step);
}

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


[Issue 5937] Problem with map!delegate(iota(floating point))

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5937


Ali Cehreli  changed:

   What|Removed |Added

 CC||acehr...@yahoo.com


--- Comment #2 from Ali Cehreli  2013-04-04 11:18:02 PDT ---
This doesn't seem to be an issue anymore. Both of the programs compile and run
successfully. (After removing two extraneous semicolons.)

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


[Issue 9876] deprecated is not announced

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9876


Andrej Mitrovic  changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #1 from Andrej Mitrovic  2013-04-04 
08:31:57 PDT ---
(In reply to comment #0)
> This code should announce deprecation:
> ---
> alias a b;
> deprecated enum a = 0;
> ---
> 
> It is hoped that the following message is announced:
> ---
> $ dmd -c main
> main.d(1): Deprecation: variable main.a is deprecated

However I think this should be silent:

---
deprecated alias a b;
deprecated enum a = 0;
---

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


[Issue 9876] New: deprecated is not announced

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9876

   Summary: deprecated is not announced
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: zan77...@nifty.com


--- Comment #0 from SHOO  2013-04-04 07:35:19 PDT ---
This code should announce deprecation:
---
alias a b;
deprecated enum a = 0;
---

It is hoped that the following message is announced:
---
$ dmd -c main
main.d(1): Deprecation: variable main.a is deprecated

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


[Issue 9875] opDispatch is wrongly set to safe

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9875



--- Comment #1 from Andrej Mitrovic  2013-04-04 
07:19:08 PDT ---
Oh and I'm using 2.063 git-head.

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


[Issue 9875] New: opDispatch is wrongly set to safe

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9875

   Summary: opDispatch is wrongly set to safe
   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: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic  2013-04-04 
07:17:16 PDT ---
import std.string;

mixin template Mixin()
{
auto test()()  // must be template to reproduce
{
static struct Dispatch  // move outside of 'test' and it works
{
void opDispatch(string name, Args...)(Args args)
{
assert(0, format("%s", ""));
}
}

return Dispatch();
}
}

mixin Mixin!();

void main()
{
test().foo();
}

Error: safe function 'test.Mixin!().test!().test.Dispatch.opDispatch!("foo",
).opDispatch' cannot call system function 'std.string.format!(char,
string).format'

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


[Issue 9346] nested struct calls disabled postblit

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9346


Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull
Version|unspecified |D2


--- Comment #1 from Kenji Hara  2013-04-04 07:10:30 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1838

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


[Issue 9874] Function call syntax disuniformity in template constraints

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9874


Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara  2013-04-04 06:03:14 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1837

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


[Issue 9874] New: Function call syntax disuniformity in template constraints

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9874

   Summary: Function call syntax disuniformity in template
constraints
   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 2013-04-04 05:02:04 PDT ---
It seems inside the template constraints functions must be called with a
trailing (), unlike from other functions:


bool foo() {
return true;
}
void bar1(T)(T) if (foo()) {} // OK
void bar2(T)(T) if (foo)   {} // error
void main() {
foo;  // OK
bar1(0);
bar2(0);
}



dmd 2.063alpha gives:

temp.d(5): Error: constraint foo is not constant or does not evaluate to a bool

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


[Issue 9873] Built-in tuple should support equality comparison

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9873



--- Comment #3 from Andrej Mitrovic  2013-04-04 
03:46:36 PDT ---
(In reply to comment #2)
> Will this fix any of these?:
> 
> Issue 6582
> Issue 9192

Sorry that should have been:

Issue 6852
Issue 9192

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


[Issue 9873] Built-in tuple should support equality comparison

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9873


Andrej Mitrovic  changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #2 from Andrej Mitrovic  2013-04-04 
03:46:04 PDT ---
Will this fix any of these?:

Issue 6582
Issue 9192

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


[Issue 6178] Struct inside the AA are not init correctly

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6178



--- Comment #16 from Kenji Hara  2013-04-04 03:11:17 PDT 
---
(In reply to comment #15)
> Than this a part of a bigger shit.
> 
> /* Known as a problem of filling newly created space of AA array
>with T.init before assigning actual object.
>If operation is interrupted, this leads to AA array containing
>"orphan" T.init objects by no reason. Was reported in BZ.
> */
> import std.stdio;
> 
> int foo()
> {
> throw new Exception("");
> }
> 
> int[int] array;
> 
> void main()
> {
> try
> {
> array[1] = foo();
> }
> catch(Exception e)
> {
> 
> }
> writeln(array);
> }
> 
> Compiling with -O => [1:0]
> Compiling with -release => []
> Compiling with -noboundscheck => []
> 
> So, it appears that there is not only bug with AA assignment, but the bug
> depends on compiler options.

It was bug 3825, and has already fixed in 2.063 (git head).

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


[Issue 9873] Built-in tuple should support equality comparison

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9873


Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara  2013-04-04 02:55:31 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1836

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


[Issue 9873] New: Built-in tuple should support equality comparison

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9873

   Summary: Built-in tuple should support equality comparison
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara  2013-04-04 02:42:06 PDT ---
Test case:

template Seq(T...) { alias Seq = T; }
struct Tup(T...) { T field; alias field this; }

void main()
{
auto seq1 = Seq!(1, "hi");
auto tup1 = Tup!(int, string)(1, "hi");

assert(Seq!(1, "hi") == Seq!(1, "hi"));
assert(Seq!(1, "hi") == seq1);
assert(Seq!(1, "hi") == tup1);

assert(seq1 == Seq!(1, "hi", [1,2]));  // should be compiler error
}

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


[Issue 9858] const alias this fails when opAssign is present

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9858


Kenji Hara  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 9865] Crash on bogus import / circular reference

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9865


Kenji Hara  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 9829] rdmd passes '--' to dmd

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9829


Alex R�nne Petersen  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||a...@lycus.org
 Resolution||FIXED


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


[Issue 9829] rdmd passes '--' to dmd

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9829



--- Comment #2 from github-bugzi...@puremagic.com 2013-04-04 01:39:50 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/tools

https://github.com/D-Programming-Language/tools/commit/e1c792bf17ef65efdb171f4658817dfe65dc7271
fix Issue 9829

- getting program and arguments before calling getopt
  on the shortended args avoids the need for the '--'
  getopt separator in the first place

https://github.com/D-Programming-Language/tools/commit/e34bb76a96269c54e0748df568183e30ca470674
Merge pull request #54 from dawgfoto/fix9829

fix Issue 9829

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


[Issue 9858] const alias this fails when opAssign is present

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9858



--- Comment #2 from github-bugzi...@puremagic.com 2013-04-04 01:24:48 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/c6ebfc21c8fd050b13dfd8cb2da8803797d261bc
fix Issue 9858 - const alias this fails when opAssign is present

Type::makeXXX had unintentionally taken over Type(Struct|Class)::att field.

https://github.com/D-Programming-Language/dmd/commit/afd7c3d0555d7407bc55a2fb3e3dbf864413d23e
Merge pull request #1828 from 9rnsr/fix9858

[REG2.063a] Issue 9858 - const alias this fails when opAssign is present

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


[Issue 9465] Wrong code for delegate call

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9465


Don  changed:

   What|Removed |Added

   Severity|major   |critical


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


[Issue 9872] format should include class field values

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9872



--- Comment #1 from Andrej Mitrovic  2013-04-04 
00:32:34 PDT ---
Workaround:

private mixin template genToString()
{
override string toString()
{
import std.array;
import std.conv;
import std.string;

Appender!(string[]) result;

foreach (val; this.tupleof)
{
result ~= to!string(val);
}

return format("%s(%s)", __traits(identifier, typeof(this)), 
result.data.join(", "));
}
}

class C
{
int x, y;
mixin genToString;
}

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


[Issue 9872] format should print class fields

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9872


Andrej Mitrovic  changed:

   What|Removed |Added

   Severity|normal  |enhancement


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


[Issue 9872] New: format should print class fields

2013-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9872

   Summary: format should print class fields
   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  2013-04-04 
00:27:25 PDT ---
This is an unfortunate inconsistency:

import std.stdio;
import std.string;

struct S
{
int x, y;
}

class C
{
int x, y;
}

void main()
{
auto s1 = format("%s", S());
auto s2 = format("%s", new C());

writeln(s1);  // S(0, 0)
writeln(s2);  // test.C
}

It forces us to either always define a toString() method or call some custom
user-provided formatting function. format() should try to print the values of
the class fields if the toString method is not defined.

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