[Issue 9442] typeid() doesn't work without `this.` for class fields

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9442


Benjamin Thaut c...@benjamin-thaut.de changed:

   What|Removed |Added

 CC||c...@benjamin-thaut.de


--- Comment #2 from Benjamin Thaut c...@benjamin-thaut.de 2013-02-03 05:47:59 
PST ---
There is a workaround:

typeid(typeof(this.c));

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


[Issue 7549] typeof of overloaded function picks the lexically first one

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7549


Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

 CC||and...@erdani.com


--- Comment #4 from Andrei Alexandrescu and...@erdani.com 2013-02-03 07:00:13 
PST ---
Let me add one more case that doesn't involve any property-related stuff:

unittest
{
class C1 {
int fun(string) { return 1; }
int fun() { return 1; }
}
auto c1 = new C1;
writeln(typeof(c1.fun).stringof);
}

This should fail with ambiguity error, but actually prints the type of the
first overload.

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


[Issue 9446] New: .keys missing from properties table at http://dlang.org/hash-map.html

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9446

   Summary: .keys missing from properties table at
http://dlang.org/hash-map.html
   Product: D
   Version: unspecified
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: websites
AssignedTo: nob...@puremagic.com
ReportedBy: john.loughran.col...@gmail.com


--- Comment #0 from John Colvin john.loughran.col...@gmail.com 2013-02-03 
09:25:07 PST ---
Pretty self-explanatory.

As can be seen here, there's missing html.

trtdspan class=notranslatespan class=d_inlinecode
donthyphenate.length/span
/span/tdtdReturns number of values in the
associative array. Unlike for dynamic arrays, it is read-only./td/tr
trtd/tdtdReturns dynamic array, the elements of which are the keys in
the associative array./td/tr

It's been suggested that it could be a be a bug in the hyphenation JS.

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


[Issue 9438] Strange RefCounted stack overflow

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9438



--- Comment #9 from monarchdo...@gmail.com 2013-02-03 09:26:40 PST ---
(In reply to comment #8)
 It really seems to be codegen bug.

Thankyou for investigating this. As I said, it really is out of my league. Do
you know what the next step is for fixing this? Who we should forward it to?

We should really get this fixed. Stack corruption when an exception is thrown?
Nothing good can come out of this.

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


[Issue 8847] voldemort + inout confuses is

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8847



--- Comment #8 from github-bugzi...@puremagic.com 2013-02-03 09:40:26 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/1116d6bab4aefad92ff94205a25b82cc51d06237
fix Issue 8847 - voldemort + inout confuses is

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


[Issue 7104] linker error on void main(){ typeof(new class{}) c; c = new typeof(c); }

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7104


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

   What|Removed |Added

   Keywords||link-failure, pull
 CC||andrej.mitrov...@gmail.com
   Platform|Other   |All
 AssignedTo|nob...@puremagic.com|andrej.mitrov...@gmail.com
 OS/Version|Linux   |All


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
10:26:44 PST ---
https://github.com/D-Programming-Language/dmd/pull/1607

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


[Issue 9408] invariant should be non-const by default and settable to const

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9408


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2013-02-03 
11:20:58 PST ---
I think this change is a step backwards.

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


[Issue 9408] invariant should be non-const by default and settable to const

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9408


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #3 from bearophile_h...@eml.cc 2013-02-03 11:43:10 PST ---
(In reply to comment #2)
 I think this change is a step backwards.

I think in this discussion there are two main sides:

Some people want to write D code right now, so they don't want to fight too
much with problems caused by const. And they like freedom. Often this side is
also associated with the worse is better language design philosophy.

They other camp reads the texts written by the creator of the Eiffel language,
that explain what Contracts are and what they are meant to. For them a
precondition or an invariant should never modify the state of the struct/class.
And the language should enforce this, to avoid bugs. They accept less a bit
less convenience for stronger guarantees and cleaner code.
Mathematics-oriented people are often on this side.

D language has introduced const/invariant, but it's so strong that sometimes
you don't want or your can't use it. So sometimes D programmers don't want to
eat their own dog food.

I generally prefer a more clean style of coding, because from experience I
have seen that the amount of time wasted making a fussy type system happy, is
often paid later in less bugs, that otherwise waste far more of my time.

But in the end I sympathize with both camps, for different reasons. Both are
partially right. In the end a static analysis tool can just enforce all
invariants to be tagged with const, so the end result is not too much
different.

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


[Issue 8981] bool and %s don't honor formating flags

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8981


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

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||DUPLICATE


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
12:34:39 PST ---
Fixed in Issue 7142.

*** This issue has been marked as a duplicate of issue 7142 ***

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


[Issue 7142] Wrong formatted write of boolean values

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7142


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

   What|Removed |Added

 CC||monarchdo...@gmail.com


--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
12:34:39 PST ---
*** Issue 8981 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 8920] iota(byte), iota(ushort)

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8920


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

   What|Removed |Added

   Keywords||pull
 CC||andrej.mitrov...@gmail.com
   Platform|x86 |All
 AssignedTo|nob...@puremagic.com|andrej.mitrov...@gmail.com
 OS/Version|Windows |All
   Severity|enhancement |normal


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
12:47:03 PST ---
https://github.com/D-Programming-Language/phobos/pull/1107

I'd say this is a bug, not an enhancement.

However the last line where you use iota with chars is not part of my pull, I
think that should be an enhancement (I really don't want to get dragged into
another Unicode discussion with chars/wchars/dchars so I've left it alone).

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


[Issue 8920] iota should work with all integral types

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8920



--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
12:48:00 PST ---
Tidied up the title to make it look nicer in the changelog.

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


[Issue 8585] iota(ubyte) problem

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8585


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

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||DUPLICATE


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
12:57:54 PST ---
*** This issue has been marked as a duplicate of issue 8920 ***

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


[Issue 8920] iota should work with all integral types

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8920



--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
12:57:54 PST ---
*** Issue 8585 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 8432] format should qualify enum type with its value

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8432


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX


--- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
13:01:48 PST ---
Not too important for me, I'm closing it.

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


[Issue 5783] Const Tuple equality

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5783


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

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||WORKSFORME


--- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
13:08:22 PST ---
Seems to be fixed in 2.061.

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


[Issue 8367] std.range.chain's template constraint is inadequate

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8367


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

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||FIXED


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


[Issue 5265] std.array.back does not work correctly for wchar-based arrays

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5265


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

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||WORKSFORME


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
13:09:53 PST ---
Works in 2.061. Was a test-case added though? If not it should be put in.

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


[Issue 8920] iota should work with all integral types

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8920



--- Comment #4 from bearophile_h...@eml.cc 2013-02-03 14:05:42 PST ---
(In reply to comment #2)
 Tidied up the title to make it look nicer in the changelog.

Thank you. I am not native English, so sometimes my titles are suboptimal.



 However the last line where you use iota with chars is not part of
 my pull, I think that should be an enhancement (I really don't want
 to get dragged into another Unicode discussion with
 chars/wchars/dchars so I've left it alone).

What's the problem with iota('a', 'f') ?

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


[Issue 4287] opOpAssign!(~=) for std.array.Appender

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4287


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

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com
   Platform|Other   |All
 AssignedTo|nob...@puremagic.com|andrej.mitrov...@gmail.com
 OS/Version|Windows |All


--- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
15:20:42 PST ---
Question:

Why was opOpAssign in that pull implemented with returning the 'this'
reference? I saw this in TDPL too, but I don't see the benefit of having this
compile:

(foo ~= 1) ~= 1;

Anyway as that pull was closed since it did too much I'm taking over this
enhancement.

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


[Issue 4287] opOpAssign!(~=) for std.array.Appender

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4287


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

   What|Removed |Added

   Keywords||pull
Version|future  |D2


--- Comment #6 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
15:41:57 PST ---
https://github.com/D-Programming-Language/phobos/pull/1108

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


[Issue 3572] declaring pure function with void return type should be compile time error

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3572


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

   What|Removed |Added

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


--- Comment #6 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-03 
15:53:14 PST ---
(In reply to comment #3)
 (In reply to comment #2)
  ?  Why would you allow out parameters in a pure function?  This seems
  reasonable for simple value types (ints, floats, etc.), but when you start
  passing objects in, you start allowing the modification of whole object
  subgraphs from pure functions.  This makes no sense.
 
 Why doesn't it make sense? Aren't you thinking of inout parameters? A pure
 function  void foo(out A a); ought to be exactly the same as A foo(); together
 with an assignment. I'm not seeing anything impure in that.
 BTW, it works fine in CTFE. (CTFE isn't quite the same concept as pure, but
 it's close).

Should we close this report then?

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


[Issue 4287] opOpAssign!(~=) for std.array.Appender

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4287



--- Comment #7 from bearophile_h...@eml.cc 2013-02-03 16:03:05 PST ---
(In reply to comment #5)

 Why was opOpAssign in that pull implemented with returning the 'this'
 reference? I saw this in TDPL too, but I don't see the benefit of having this
 compile:
 
 (foo ~= 1) ~= 1;

Sometimes I like the assignment to return the value, to write:

a = b = c;

But I think the append doesn't need to return a value.

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


[Issue 8920] iota should work with all integral types

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8920



--- Comment #5 from github-bugzi...@puremagic.com 2013-02-03 16:29:58 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/3625bcb7e86c5784df53601dd3cce32bf420312f
Fixes Issue 8920 - iota should work with types smaller than int.

https://github.com/D-Programming-Language/phobos/commit/cc135ce7035bb95a0d0a186c2be1103bdd9e21c9
Merge pull request #1107 from AndrejMitrovic/Fix8920

Issue 8920 - iota should work with types smaller than int

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


[Issue 8920] iota should work with all integral types

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8920


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 7236] Protected class members in different file inaccessible

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7236


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

   What|Removed |Added

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


--- Comment #6 from Walter Bright bugzi...@digitalmars.com 2013-02-03 
16:52:52 PST ---
This is exactly the way it is designed to work. Accessibility is determined by
the 'this' pointer, not the function it is in (C++ operates the same way). And,
of course, code in a module has all access to other classes in the same module.

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


[Issue 9447] New: iota should generate char intervals too

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9447

   Summary: iota should generate char intervals too
   Product: D
   Version: D2
  Platform: All
OS/Version: All
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 2013-02-03 18:05:18 PST ---
Spinoff of Issue 8920


import std.range: iota;
void main() {
foreach (i; iota('a', 'f')) {}
}


DMD 2.062alpha gives:

temp.d(3): Error: template std.range.iota does not match any function template
declaration. Candidates are:
...\dmd2\src\phobos\std\range.d(5107):std.range.iota(B, E, S)(B begin,
E end, S step) if ((isIntegral!(CommonType!(B, E)) || isPointer!(CommonType!(B,
E)))  isIntegral!(S))
...\dmd2\src\phobos\std\range.d(5192):std.range.iota(B, E)(B begin, E
end) if (isFloatingPoint!(CommonType!(B, E)))
...\dmd2\src\phobos\std\range.d(5199):std.range.iota(B, E)(B begin, E
end) if (isIntegral!(CommonType!(B, E)) || isPointer!(CommonType!(B, E)))
...\dmd2\src\phobos\std\range.d(5260):std.range.iota(E)(E end)
...\dmd2\src\phobos\std\range.d(5267):std.range.iota(B, E, S)(B begin,
E end, S step) if (isFloatingPoint!(CommonType!(B, E, S)))
temp.d(3):... (1 more, -v to show) ...
...\dmd2\src\phobos\std\range.d(5107): Error: template std.range.iota cannot
deduce template function from argument types !()(char,char)

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


[Issue 3572] declaring pure function with void return type should be compile time error

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3572


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


--- Comment #7 from Kenji Hara k.hara...@gmail.com 2013-02-03 18:50:45 PST ---
In current, we can declare a pure function which has weak purity.

pure void foo(int* p, out string s, ref int[] arr);

All results are returned through its parameters.
So, returning void itself has no problem in pure functions.

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


[Issue 8542] crosstalk between template instantiations

2013-02-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8542



--- Comment #12 from github-bugzi...@puremagic.com 2013-02-03 19:24:48 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/468f7e12c4b1eea25bc88463f700fa62988a90cd
Replace unittests to avoid issue 8542.

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