[Issue 2642] ClassInfo.init contains zeroes

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


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

   What|Removed |Added

   Keywords|spec|


--- Comment #12 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
00:13:57 PST ---
Not a spec issue.

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


[Issue 2653] ConditionalStatement not referenced in rest of grammar

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


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

   What|Removed |Added

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


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
00:17:50 PST ---
If a conditional is used in module scope, it cannot contain statements. Hence,
the existing grammar is correct.

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


[Issue 2661] Symbol not listed as valid template parameter in grammar

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


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
00:21:11 PST ---
TemplateAliasParameters are for symbols.

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


[Issue 2662] Symbol template argument not defined by grammar or text

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


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
00:23:18 PST ---
The grammar is given here:

dlang.org/template.html#Symbol

And it's described under TemplateAliasParameter.

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


[Issue 2680] Declarator rule is broken

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


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
00:25:06 PST ---
BasicType2 is shown as optional in the grammar.

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


[Issue 2733] Unclear semantics of template value parameters

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


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

   What|Removed |Added

   Keywords|spec|
 CC||bugzi...@digitalmars.com


--- Comment #5 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
00:28:38 PST ---
Not a spec issue - it's a D1 only bug where a template value parameter that is
not a compile-time constant is allowed.

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


[Issue 2742] std.stdio assumes console works in utf-8

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


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

   What|Removed |Added

   Keywords|spec|
 CC||bugzi...@digitalmars.com


--- Comment #13 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
00:29:35 PST ---
Not a language spec issue.

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


[Issue 2753] Cannot declare pointer to function returning ref

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


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com
   Severity|normal  |enhancement


--- Comment #9 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
00:34:00 PST ---
ref is a storage class - not a function attribute or type modifier. The grammar
isn't broken, it's just a quirk in it. Changing it would be an enhancement
request.

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


[Issue 2830] private attribute doesn't work for structs/unions/classes

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


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

   What|Removed |Added

   Keywords|spec|
 CC||bugzi...@digitalmars.com


--- Comment #8 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
00:36:23 PST ---
It's not a spec bug. Private declarations should not be visible outside their
module.

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


[Issue 2894] abstract classes sometimes allow non-abstract bodyless functions

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



--- Comment #2 from github-bugzi...@puremagic.com 2012-01-23 00:48:15 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/341a8f7233d74c9313625290eff8af57af3c2d2a
fix Issue 2894 - abstract classes sometimes allow non-abstract bodyless
functions

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


[Issue 2894] abstract classes sometimes allow non-abstract bodyless functions

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


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 2916] struct constructor use syntax undocumented

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


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

   What|Removed |Added

   Keywords|spec|
 CC||bugzi...@digitalmars.com


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
00:57:33 PST ---
This is a compiler bug that a(n) is accepted, it is not a documentation
problem.

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


[Issue 3083] Some parameter storage classes are undocumented

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


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
00:59:47 PST ---
Already done.

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


[Issue 3084] Formatting of lazy in parameters section

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



--- Comment #1 from github-bugzi...@puremagic.com 2012-01-23 01:03:06 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/526f997bcfe9fa9b22623d3f31876781d0bd90f4
fix Issue 3084 - Formatting of lazy in parameters section

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


[Issue 3084] Formatting of lazy in parameters section

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


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 3085] Cannot index tuple in declaration

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


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com
   Severity|normal  |enhancement


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


[Issue 3093] Object.factory has incomplete documentation

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


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

   What|Removed |Added

   Keywords|spec|
 CC||bugzi...@digitalmars.com


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
01:07:22 PST ---
Not a spec issue.

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


[Issue 3116] clarify which type names are valid template alias parameters

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


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME


--- Comment #4 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
01:10:56 PST ---
I believe this has already been clarified.

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


[Issue 3124] updates to version.dd's list of identifiers

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



--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
01:14:19 PST ---
Are these still valid? Can you do a pull request?

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


[Issue 3179] [PATCH] Improvement of Inline Assembly D 2.0 specification

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



--- Comment #8 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
01:19:15 PST ---
A pull request for this would be nice.

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


[Issue 3265] .classinfo for Interface-typed reference does not return instance's ClassInfo

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



--- Comment #3 from github-bugzi...@puremagic.com 2012-01-23 01:25:45 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/226de8cfbb07d25c498b5e2b7b794a65437b9ebc
fix Issue 3265 - .classinfo for Interface-typed reference does not return
instance's ClassInfo

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


[Issue 3265] .classinfo for Interface-typed reference does not return instance's ClassInfo

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


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 3282] The overload and override issue of const/immutable member functions

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


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

   What|Removed |Added

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


--- Comment #4 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
01:28:50 PST ---
I believe the errors are correct.

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


[Issue 3449] const and invariant struct members do not behave according to spec

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



--- Comment #9 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
01:37:27 PST ---
(In reply to comment #4)
 More strangeness:  If you don't explicitly provide an initial value for
 const/immutable members, they do contribute to the size of the struct.
 struct Foo { const int i; }
 writeln(Foo.sizeof); // Prints 4
 struct Bar { const int i = 123; }
 writeln(Bar.sizeof); // Prints 1

This is as designed. A const field without an initializer can be initialized by
a constructor. A const field with an initializer does not need any per-instance
storage, and becomes a static member.

 I suspect that this bug could cause unexpected memory corruption when such
 structs are, for instance, passed to C functions -- especially when the
 behaviour depends on such a small detail.

It is not a bug, it is as designed. (const in D and C are different, and
conflating the two will cause problems anyway)

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


[Issue 3449] const and invariant struct members do not behave according to spec

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


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

   What|Removed |Added

   Keywords|spec|


--- Comment #10 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
01:39:58 PST ---
(In reply to comment #0)
 When struct members are declared const or invariant, they seem to become
 manifest constants. Example:
   struct Foo { const int bar = 123; }
   writeln(Foo.sizeof);   // Prints 1, not 4
   Foo foo;
   auto p = foo.bar; // Error: constant 123 is not an lvalue

Taking the address should work. Compiler bug, not a spec issue.

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


[Issue 3492] Can't overload nested functions

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



--- Comment #1 from github-bugzi...@puremagic.com 2012-01-23 01:42:44 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/5d98834d711cebd4d218a0580856b84de6dcb10f
fix Issue 3492 - Can't overload nested functions

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


[Issue 3492] Can't overload nested functions

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


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 3578] Impossible to run a struct invariant using assert(s)

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



--- Comment #4 from github-bugzi...@puremagic.com 2012-01-23 01:50:33 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/8ed7c3ded95c50a4dc297a272fa53c0deb18e68e
fix Issue 3578 - Impossible to run a struct invariant using assert(s)

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


[Issue 3578] Impossible to run a struct invariant using assert(s)

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


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

   What|Removed |Added

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


--- Comment #4 from github-bugzi...@puremagic.com 2012-01-23 01:50:33 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/8ed7c3ded95c50a4dc297a272fa53c0deb18e68e
fix Issue 3578 - Impossible to run a struct invariant using assert(s)

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


[Issue 3599] Navigation sidebar should have const and immutable link

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


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
01:52:59 PST ---
Already fixed.

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


[Issue 3708] ImportExpression should be clear on how file is found

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


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

   What|Removed |Added

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


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
01:58:25 PST ---
Where the files are looked for is an implementation defined detail, and does
not belong in the language specification. On the dmd page
http://dlang.org/dmd-windows.html under the -J switch is the lookup detail.

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


[Issue 7352] New: Poor error message when using variable as template type parameter

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

   Summary: Poor error message when using variable as template
type parameter
   Product: D
   Version: D1  D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: clugd...@yahoo.com.au


--- Comment #0 from Don clugd...@yahoo.com.au 2012-01-23 02:16:23 PST ---
template Foo(X)
{
 alias int Foo;
}

int m;
alias Foo!(m) XXX;

bug.d(7): Error: template instance Foo!(m) does not match template declaration
Foo(X)

It should say something like, m is not a type.

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


[Issue 6013] private ignored for aliases

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



--- Comment #1 from github-bugzi...@puremagic.com 2012-01-23 02:15:15 PST ---
Commit pushed to https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ac75ddc83d5cffd913fbfd6f2bbb9cbe91364479
Merge pull request #636 from dawgfoto/fix6013

Issue 6013 - private ignored for aliases

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


[Issue 1382] memory allocated for arrays in CTFE functions during compilation is not released

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


Leandro Lucarella leandro.lucare...@sociomantic.com changed:

   What|Removed |Added

 CC||leandro.lucarella@sociomant
   ||ic.com


--- Comment #10 from Leandro Lucarella leandro.lucare...@sociomantic.com 
2012-01-23 02:41:48 PST ---
Is there any technical reason not to use the Bohem GC as a temporary workaround
until this can get properly fixed? I'm just curious.

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


[Issue 3449] const and invariant struct members do not behave according to spec

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



--- Comment #11 from Kenji Hara k.hara...@gmail.com 2012-01-23 04:28:52 PST 
---
(In reply to comment #9)
 This is as designed. A const field without an initializer can be initialized 
 by
 a constructor. A const field with an initializer does not need any 
 per-instance
 storage, and becomes a static member.

 It is not a bug, it is as designed. (const in D and C are different, and
 conflating the two will cause problems anyway)

(In reply to comment #10)
 Taking the address should work. Compiler bug, not a spec issue.

I think that  the *implicit static* variable is the worst specification in D.
'const/immutable(not modifiable)' and 'static(not per-instance)' is definitely
orthogonal concepts, but in your argument, they are scary mixed.

So, if we want to need static variable, language *must* require 'static'
storage class for the purpose. Otherwise, it will force us a big (and
meaningless) leap of imaging.

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


[Issue 7279] Inconsistent overloading between arrays and scalars

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


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-01-23 04:48:55 PST ---
int[] is a value with mutable indirection, so copy conversion from immutable
int[] to int[] is invalid. Then the callings of f and g with arr are solved
with no ambiguous.

But, immutable int is a value without mutable indirection, so copy conversion
from immutable int to int is *valid*. Then callings of h makes ambiguous with
the two const-conversions, immutable int - int and immutable int - const int.

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


[Issue 2916] struct constructor use syntax undocumented

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


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-01-23 04:59:33 PST ---
The constructor call from an instance is invalid.

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

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


[Issue 6036] Constructor, static opCall and object opCall

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


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

   What|Removed |Added

 CC||steve.te...@britseyeview.co
   ||m


--- Comment #6 from Kenji Hara k.hara...@gmail.com 2012-01-23 04:59:33 PST ---
*** Issue 2916 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 3449] const and invariant struct members do not behave according to spec

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



--- Comment #12 from Stewart Gordon s...@iname.com 2012-01-23 05:16:02 PST ---
(In reply to comment #11)
 I think that  the *implicit static* variable is the worst 
 specification in D.  'const/immutable(not modifiable)' and 
 'static(not per-instance)' is definitely orthogonal concepts, but 
 in your argument, they are scary mixed.

Agreed.  Half the point of structs is that the layout in memory can be
guaranteed.  Being able to include immutable values within this memory layout
(such as struct size in the case of some Windows API structs, or file format
signatures) should be part of this.

In classes, where there is no guarantee of memory layout, it makes sense to
optimise immutable members to be static.  In structs, OTOH, const/immutable
should do what it says and nothing more.

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


[Issue 7353] New: NRVO not properly working with inferred return type

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

   Summary: NRVO not properly working with inferred return type
   Product: D
   Version: D1  D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: performance
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: mrmoc...@gmx.de


--- Comment #0 from Trass3r mrmoc...@gmx.de 2012-01-23 16:27:36 CET ---
import std.stdio;
struct S
{
static uint ci = 0;
uint i;

this(int x)
{
i = ci++;
writeln(new: , i);
}

this(this)
{
i = ci++;
writeln(copy , i);
}

~this()
{
writeln(del , i);
}

S save1() // produces 2 copies in total
{
S s = this;
return s;
}

auto save2() // produces 3 copies in total
{
S s = this;
return s;
pragma(msg, typeof(return));
}

S save3()
{
return this;
}
}

void main()
{
{
S s = S(1);
S t = S(1);

t = s.save1();
}

writeln(-);
S.ci = 0;
{
S s = S(1);
S t = S(1);
t = s.save2();
}

writeln(-);
S.ci = 0;
{
S s = S(1);
S t = S(1);
t = s.save3();
}
}


$ dmd -run test.d
//or dmd -release -run test.d
//or dmd -release -O -run test.d
S
new: 0
new: 1
copy 2
del 1
del 2
del 0
-
new: 0
new: 1
copy 2
copy 3
del 2
del 1
del 3
del 0
-
new: 0
new: 1
copy 2
del 1
del 2
del 0

$ dmd -release -O -inline -run test.d
S
new: 0
new: 1
copy 2
del 1
del 2
del 0
-
new: 0
new: 1
copy 2
copy 3
del 2
del 1
del 3
del 0
-
new: 0
new: 1
del 1
del 0
del 0

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


[Issue 7353] NRVO not properly working with inferred return type

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


Trass3r mrmoc...@gmx.de changed:

   What|Removed |Added

   Keywords||wrong-code


--- Comment #1 from Trass3r mrmoc...@gmx.de 2012-01-23 16:32:24 CET ---
Hmm that last one even looks like a wrong-code bug, 0 is deleted twice.

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


[Issue 1918] __traits(getVirtualFunctions) returns final functions

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



--- Comment #9 from yebblies yebbl...@gmail.com 2012-01-24 02:36:20 EST ---
(In reply to comment #6)
 Why would it be useful to have a non-virtual function listed as a virtual
 function? Because that's what you're doing when mark a function which doesn't
 override anything final. It's _not_ in any kind of override chain.

Well, you make some good points.  I'm not entirely convinced there isn't some
template forwardingy application (are there any uses for
__traits(getVirtualFunctions)?) that would find the other way useful.

Anyway, I'm not sure this fix is correct.  After a little bit of poking around
I discovered that a final method that doesn't override anything IS STILL
VIRTUAL.  It still creates a vtable slot.  Is this a bug?  From what I can tell
that means there is no way to actually create a non-virtual non-static member
function.  If final functions that do not override anything were implicitly
non-virtual, it would fix this bug.

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


[Issue 2830] private attribute doesn't work for structs/unions/classes

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



--- Comment #9 from Jonathan M Davis jmdavisp...@gmx.com 2012-01-23 07:51:48 
PST ---
 It's not a spec bug. Private declarations should not be visible outside their
 module.

Do you mean not visible or not accessible? At present, private seems to work
like C++ in that it's _always_ visible but not accessible. It's included in
overload sets too.

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


[Issue 1918] __traits(getVirtualFunctions) returns final functions

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



--- Comment #10 from Jonathan M Davis jmdavisp...@gmx.com 2012-01-23 07:56:13 
PST ---
final functions which don't override anything _definitely_ shouldn't be
virtual. There's no reason for them to be virtual, and it harms performance. If
the compiler fails to make them non-virtual, then that's definitely a bug.

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


[Issue 1918] __traits(getVirtualFunctions) returns final functions

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



--- Comment #11 from yebblies yebbl...@gmail.com 2012-01-24 04:25:43 EST ---
(In reply to comment #10)
 final functions which don't override anything _definitely_ shouldn't be
 virtual. There's no reason for them to be virtual, and it harms performance. 
 If
 the compiler fails to make them non-virtual, then that's definitely a bug.

By the looks of it, the compiler manages to optimize out the virtual call with
all final functions, which is probably why nobody ever noticed this before. 
The problem seems to be that whether the functions actually needs a vtable slot
is resolved much too late.  This is essential for linking with c++, which I'm
trying to improve.

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


[Issue 6013] private ignored for aliases

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



--- Comment #2 from github-bugzi...@puremagic.com 2012-01-23 10:05:54 PST ---
Commit pushed to https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d4392ab38c33d17566a18de0c8416aa7c72b3a10
fix issue 6013 for D1

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


[Issue 6013] private ignored for aliases

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


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 1382] memory allocated for arrays in CTFE functions during compilation is not released

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



--- Comment #11 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
11:23:06 PST ---
I made an experimental build of dmd that uses a gc. The compiler slowed down
quite a bit.

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


[Issue 2830] private attribute doesn't work for structs/unions/classes

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



--- Comment #10 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
11:25:49 PST ---
I meant accessible.

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


[Issue 7348] to!string(null) matches more than one template declaration

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



--- Comment #2 from Mariusz Gliwiński alienballa...@gmail.com 2012-01-23 
11:58:31 PST ---
[quote]What are you trying to do here?[/quote]

void test(A)(A param)
{
writeln(A(,text(param),) called);
}

void main() {
test(null);
}

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


[Issue 3282] The overload and override issue of const/immutable member functions

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


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

   What|Removed |Added

 Status|RESOLVED|REOPENED
 CC||timon.g...@gmx.ch
 Resolution|WORKSFORME  |


--- Comment #5 from timon.g...@gmx.ch 2012-01-23 13:41:57 PST ---
I think it is a bug. The derived class introduces two additional overloads. The
compiler claims that all three overloads override the same function.

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


[Issue 7348] to!string(null) matches more than one template declaration

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



--- Comment #3 from Jonathan M Davis jmdavisp...@gmx.com 2012-01-23 13:49:20 
PST ---
Yeah. That doesn't really make sense. null could be anything that's null. And
what type that is completely changes how text is instantiated. If you cast null
to the type that you want, then it'll work. But null is its own type. You can't
really do anything with null on its own like that. It needs be a null
_something_, not just null.

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


[Issue 3735] op=

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



--- Comment #6 from github-bugzi...@puremagic.com 2012-01-23 14:15:24 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/2b757bdcc82c69ff4021361acd93f8a0b26df65c
fix Issue 3735 - op=

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


[Issue 3735] op=

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


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 3791] Reference anonymous nested classes when describing new expressions

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



--- Comment #2 from github-bugzi...@puremagic.com 2012-01-23 14:45:59 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/d3a36f1572f0187c0bf85097f86050f6dbc533f3
fix Issue 3791 - Reference anonymous nested classes when describing new
expressions

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


[Issue 3791] Reference anonymous nested classes when describing new expressions

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


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

   What|Removed |Added

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


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
14:46:59 PST ---
I added a link for your first comment, but I don't know what you mean by the
second.

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


[Issue 3800] Foreach over Structs and Classes with Ranges and Invariant Struct in D2 Spec

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


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

   What|Removed |Added

 Status|ASSIGNED|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 3800] Foreach over Structs and Classes with Ranges and Invariant Struct in D2 Spec

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



--- Comment #3 from github-bugzi...@puremagic.com 2012-01-23 14:50:43 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/baa8b09e9f34d25d5412f029e94074bc972213af
fix Issue 3800 - 'Foreach over Structs and Classes with Ranges' and 'Invariant
Struct' in D2 Spec

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


[Issue 3807] typedef still listed as keyword, but not present anywhere in grammar

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


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

   What|Removed |Added

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


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
14:51:59 PST ---
It's still a keyword, as typedefs are deprecated but still allowed.

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


[Issue 3800] Foreach over Structs and Classes with Ranges and Invariant Struct in D2 Spec

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



--- Comment #4 from Andrei Alexandrescu and...@metalanguage.com 2012-01-23 
15:12:35 PST ---
resynced

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


[Issue 3838] PrimaryExpression rule doesn't permit module scope template instances

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



--- Comment #1 from github-bugzi...@puremagic.com 2012-01-23 15:35:00 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/79ecd142488e0a26b47ce47fede6c5aacfcbc226
fix Issue 3838 - PrimaryExpression rule doesn't permit module scope template
instances

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


[Issue 3838] PrimaryExpression rule doesn't permit module scope template instances

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


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 3921] Compile time evaluation requirements not well-specified

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


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

   What|Removed |Added

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


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
15:41:42 PST ---
(In reply to comment #2)
 (In reply to comment #1)
  Quoting the spec:
  
  In order to be executed at compile time, the function must appear in a 
  context
  where it must be so executed
  
  Note the word MUST. I don't see anything in the spec to indicate that it is
  optional.
 No, the language above says that the correct function context is necessary, 
 not
 sufficient.  CTFE won't succeed unless the condition is met.  It definitely
 does not say that the compiler is required to try.

The second 'must' covers it.

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


[Issue 3928] Comparing imaginaries with reals produces results that are inconsistent

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


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

   What|Removed |Added

 Status|ASSIGNED|NEW
 CC||bugzi...@digitalmars.com
Version|2.041   |D1
 OS/Version|Windows |All


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
15:43:39 PST ---
Built-in complex numbers are deprecated anyway for D2, so redone as a D1 only
issue.

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


[Issue 3938] semantics of casting arrays need to be reworked

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


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
15:46:01 PST ---
Already done,

dlang.org/expression.html#CastExpression

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


[Issue 3282] The overload and override issue of const/immutable member functions

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


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

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID


--- Comment #6 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
15:47:44 PST ---
(In reply to comment #5)
 I think it is a bug. The derived class introduces two additional overloads. 
 The
 compiler claims that all three overloads override the same function.

The error messages are deliberate.

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


[Issue 3954] DeclDef rule is missing TemplateMixinDeclaration

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



--- Comment #1 from github-bugzi...@puremagic.com 2012-01-23 15:59:14 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/3f3a45cf5f703b4dfef93354e30df4160588b614
fix Issue 3954 - DeclDef rule is missing TemplateMixinDeclaration

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


[Issue 3954] DeclDef rule is missing TemplateMixinDeclaration

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


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 3282] The overload and override issue of const/immutable member functions

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


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

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |


--- Comment #7 from timon.g...@gmx.ch 2012-01-23 16:37:46 PST ---
If so, why is this code accepted?

class A{
void f(int){}
}
class B: A{
override void f(int){}
void f(immutable int){}
void f(shared int){}
}

What is the point of deliberately treating the hidden this pointer special
regarding overloading?

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


[Issue 3282] The overload and override issue of const/immutable member functions

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



--- Comment #8 from timon.g...@gmx.ch 2012-01-23 16:39:10 PST ---
Furthermore, this works, of course:

class B{
void f(int){}
void f(int)immutable{}
void f(int)shared{}
}

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


[Issue 7355] New: inout incorrectly resolved if the same type has both mutable and immutable parts

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

   Summary: inout incorrectly resolved if the same type has both
mutable and immutable parts
   Product: D
   Version: D2
  Platform: All
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-23 16:41:58 PST ---
DMD 2.058head

inout(int*)* foo(inout(int*)* x){return x;}
immutable(int)** x;
static assert(is(typeof(foo(x))==const(int*)*));

Error: static assert  (is(typeof(foo((__error))) == const(int*)*)) is false

The assertion should pass.

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


[Issue 3988] Provide canonical example for operator overloading

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



--- Comment #1 from github-bugzi...@puremagic.com 2012-01-23 17:36:39 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/ed45694454cf1510110d1ac57308841213c89780
fix Issue 3988 - Provide canonical example for operator overloading

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


[Issue 3988] Provide canonical example for operator overloading

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


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 4007] VersionSpecification not listed under DeclDef rule

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


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
17:46:11 PST ---
It's under DeclDef.

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


[Issue 4227] Overloading rules not complete in D1 docs

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


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

   What|Removed |Added

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


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
17:48:47 PST ---
I don't really see what the exact issue is here. Bug reports need to be
specific.

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


[Issue 4229] cast spec

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


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

   What|Removed |Added

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


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
17:50:43 PST ---
This is already fixed.

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


[Issue 4235] !in not working (D1)

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



--- Comment #6 from github-bugzi...@puremagic.com 2012-01-23 17:56:48 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/e5a601f2000c61b56f7ddcfa722d8c875556cf53
fix Issue 4235

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


[Issue 4235] !in not working (D1)

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


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

   What|Removed |Added

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


--- Comment #7 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
17:57:37 PST ---
!in was never intended for D1, I removed it from the spec.

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


[Issue 4295] IID_IUnknown symbol undefined in phobos.lib

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


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

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


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


[Issue 6365] Multiple var declaration

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


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

   What|Removed |Added

Summary|AutoTupleDeclaration|Multiple var declaration


--- Comment #41 from Kenji Hara k.hara...@gmail.com 2012-01-23 18:23:50 PST 
---
Changed title from AutoTupleDeclaration to Multiple var declaration.
(The name TupleDeclaration is already exist in dmd compiler source)

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


[Issue 3282] The overload and override issue of const/immutable member functions

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


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

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID


--- Comment #9 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
19:36:45 PST ---
The return types are the issue. You cannot, for example, override a function
that returns a mutable array with one that returns an immutable one. It would
be a giant hole in the type system.

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


[Issue 4399] Incomplete extern (...) docs

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


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
21:19:59 PST ---
dlang.org/attribute.html#linkage

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


[Issue 4421] Union propagates copy constructors and destructors over all members

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



--- Comment #1 from github-bugzi...@puremagic.com 2012-01-23 21:24:42 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/86ecdab02a3cdcc81c9f302b9e35212148cb06ed
fix Issue 4421 - Union propagates copy constructors and destructors over all
members

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


[Issue 4545] Alias to members possible without this instance

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



--- Comment #5 from github-bugzi...@puremagic.com 2012-01-23 21:37:57 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/eedb99442ac037495ae12c3a7732aad72a074bf6
fix Issue 4545 - Alias to members possible without 'this' instance

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


[Issue 4545] Alias to members possible without this instance

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


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

   What|Removed |Added

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


--- Comment #6 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
21:38:52 PST ---
I'm not sure what to do with this. I did make some minor tweaks to the delegate
description. If more should be done, please be specific. I don't agree that the
behavoior Tomasz is reporting is a bug; it's expected.

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


[Issue 4588] [lex] @ttributes are not documented

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


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

   What|Removed |Added

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


--- Comment #4 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
21:39:40 PST ---
These are all taken care of.

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


[Issue 4651] Docs: Returned classes that have access to stack variables of its enclosing function

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



--- Comment #1 from github-bugzi...@puremagic.com 2012-01-23 21:43:00 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/c58bfaea9250e432ec3929bc59f0bad30f006812
fix Issue 4651 - Docs: Returned classes that have access to stack variables of
its enclosing function

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


[Issue 4651] Docs: Returned classes that have access to stack variables of its enclosing function

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



--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-23 
22:30:37 PST ---
(In reply to comment #1)
 Commit pushed to
 https://github.com/D-Programming-Language/d-programming-language.org
 
 https://github.com/D-Programming-Language/d-programming-language.org/commit/c58bfaea9250e432ec3929bc59f0bad30f006812
 fix Issue 4651 - Docs: Returned classes that have access to stack variables of
 its enclosing function

Since you're on a roll (Walter) you could also $(D1) wrap the section on nested
functions, Issue 4556. If not, I'll make a pull myself.

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


[Issue 7356] New: Implement KeyType, ValueType for hashes in std.traits

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

   Summary: Implement KeyType, ValueType for hashes in std.traits
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-01-23 
22:50:34 PST ---
I've had a use-case for these but they were not in std.traits, so here's an
implementation:

import std.traits;

template KeyType(AA)
   if (isAssociativeArray!AA)
{
   static if (is(AA V : V[K], K))
   {
   alias K KeyType;
   }
}

template ValueType(AA)
   if (isAssociativeArray!AA)
{
   static if (is(AA V : V[U], U))
   {
   alias V ValueType;
   }
}

If I get an OK I can make a pull for this (with documentation).

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


[Issue 4870] Suffix for intptr_t literals

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


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
23:02:36 PST ---
You can create a template to do custom literals, like for octal:

   octal!1234

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


[Issue 4875] Allow struct initialization with constructor

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


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

   What|Removed |Added

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


--- Comment #5 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
23:04:11 PST ---
Allowing such implicit conversions works in C++, but is considered a defect by
experienced C++ professionals. We won't repeat the mistake.

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


[Issue 4887] Right-shifting by 32 is allowed and broken

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



--- Comment #9 from github-bugzi...@puremagic.com 2012-01-23 23:08:33 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/93e88288b5246370d61fd1266022eb5850f0cde5
Issue 4887 - Right-shifting by 32 is allowed and broken

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


[Issue 4887] Right-shifting by 32 is allowed and broken

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



--- Comment #10 from github-bugzi...@puremagic.com 2012-01-23 23:19:27 PST ---
Commit pushed to https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/c62d4696239a189106aacbded87cceb25331a39f
fix Issue 4887 - Right-shifting by 32 is allowed and broken

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


[Issue 4887] Right-shifting by 32 is allowed and broken

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



--- Comment #11 from github-bugzi...@puremagic.com 2012-01-23 23:25:19 PST ---
Commit pushed to https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/ecbc5db9c1ac2d4d025d6426195a2925452378ad
fix Issue 4887 - Right-shifting by 32 is allowed and broken

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


[Issue 4887] Right-shifting by 32 is allowed and broken

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


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

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
Version|1.057   |D1  D2
 Resolution||FIXED


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


[Issue 4889] Declarator in if statement allows name shadowing

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


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

   What|Removed |Added

   Keywords|spec|
 CC||bugzi...@digitalmars.com


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
23:28:02 PST ---
D1 only bug, not a spec issue.

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


[Issue 4651] Docs: Returned classes that have access to stack variables of its enclosing function

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



--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
23:30:43 PST ---
Feel free to do a pull.

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


[Issue 5058] invariant() should not be called before opAssign()

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


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

   What|Removed |Added

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


--- Comment #11 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
23:41:34 PST ---
An invariant should be written so that .init passes. Anything else would
thoroughly break how D initializes objects.

This is not a bug, it is as designed.

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


[Issue 5129] More strict 'abstract' management

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


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

   What|Removed |Added

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


--- Comment #5 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
23:46:05 PST ---
This is not a bug, as in another module there could be a class C that derives
from B and implements foo().

As documented, D accepts non-abstract functions with no body declared as:

   void foo();

with the idea that the user will be supplying a body somewhere else - perhaps
even a C function or an assembler one. It's another way of doing encapsulation
by having an opaque implementation. In fact, it's used by the TypeInfo's.

I object to calling this incredibly sloppy.

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


[Issue 5270] Using a scope delegate allows memory corruption in safe mode

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


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-01-23 
23:48:02 PST ---
This now compiles  runs successfully.

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


  1   2   >