[Issue 6113] singletons in std.datetime are not created early enough

2011-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6113



--- Comment #6 from Jose Garcia  2011-09-04 23:41:09 PDT ---
While we are on the subject, does anyone have a suggestion on how to write unit
test that test this? Or do we need to extend the unittest capability?

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


[Issue 6113] singletons in std.datetime are not created early enough

2011-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6113


Jose Garcia  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


--- Comment #5 from Jose Garcia  2011-09-04 23:38:06 PDT ---
Why was this closed? The following code still failed:

import std.datetime;

shared static this()
{
  assert(UTC() !is null);
  assert(LocalTime() !is null);
}

void main() {}

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


[Issue 4539] Refuse assignment to string literal

2011-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4539



--- Comment #12 from yebblies  2011-09-05 16:30:28 EST ---
The current patch for this issue is
https://github.com/D-Programming-Language/dmd/issues/164

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


[Issue 6602] Invalid template instantiations »leaked« by is(typeof())/__traits(compiles, …)/Type::trySemantic

2011-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6602


klickverbot  changed:

   What|Removed |Added

   Keywords||patch


--- Comment #2 from klickverbot  2011-09-04 22:52:33 PDT 
---
(I realize that A!short would never have a type, even if B!short could be
instantiated, but this is not important here.)

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


[Issue 4269] Regression(2.031): invalid type accepted if evaluated while errors are gagged

2011-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4269


klickverbot  changed:

   What|Removed |Added

 CC||c...@klickverbot.at


--- Comment #8 from klickverbot  2011-09-04 22:51:20 PDT 
---
Related, but not the same: bug 6602.

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


[Issue 6602] Invalid template instantiations »leaked« by is(typeof())/__traits(compiles, …)/Type::trySemantic

2011-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6602



--- Comment #1 from klickverbot  2011-09-04 22:25:58 PDT 
---
Wish I had discovered that earlier, not just from a bugzilla reference in the
DMD source after I tracked the problem down: A very similar bug has already
been reported, issue 4302. However, the fix proposed there (which got committed
in e66a3a5) only hides the issue for static if conditionals, while it can also
appear if trySemantic() is attempted outside them, see above.

I think the correct solution for the problem is to remove the template instance
from the member list of the enclosing scope again if instantiation failed while
errors were gagged:

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

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


[Issue 4302] Regression(2.046, 1.061): compiler errors using startsWith in CTFE

2011-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4302


klickverbot  changed:

   What|Removed |Added

 CC||c...@klickverbot.at


--- Comment #9 from klickverbot  2011-09-04 21:44:14 PDT 
---
This turned out to be an incomplete fix since this situation can not only occur
in static ifs, see bug 6602.

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


[Issue 6602] New: Invalid template instantiations »leaked« by is(typeof())/__traits(compiles, …)/Type::trySemantic

2011-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6602

   Summary: Invalid template instantiations »leaked« by
is(typeof())/__traits(compiles, …)/Type::trySemantic
   Product: D
   Version: D2
  Platform: Other
OS/Version: Mac OS X
Status: NEW
  Severity: critical
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: c...@klickverbot.at


--- Comment #0 from klickverbot  2011-09-04 21:29:25 PDT 
---
Okay, turns out that the »collateral regression« the fix for bug 6220 caused in
my code ([1]) really is a fundamental problem with how DMD handles template
instantiations in the face of error gagging, in this case because is(typeof())
is used (same for __traits(compiles, …)):

---
template A(T) {
  B!(T).Result result;
}

template B(U) {
  static assert(is(U == int));
  alias bool Result;
}

pragma(msg, is(typeof(A!short)));
---

The static assert in B!() should just cause is(typeof()) to evaluate to false,
but B!short is also added to the module member list, causing compilation to
fail because of !is(short == int).

I am working on a fix, but need an issue number to reference.


[1]
https://github.com/D-Programming-Language/dmd/commit/60f4ec88decbcd00e765ab392bf8be8f526ed1ab#commitcomment-535706

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


[Issue 2350] Contracts with a naked body are indecent

2011-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2350


Stewart Gordon  changed:

   What|Removed |Added

 CC||s...@iname.com


--- Comment #1 from Stewart Gordon  2011-09-04 15:39:44 PDT ---
In which case, what would "naked" do?  If nothing, the compiler ought to
disallow it.

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


[Issue 6601] New: Regression(2.053): CTFE segfault taking address of function template

2011-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6601

   Summary: Regression(2.053): CTFE segfault taking address of
function template
   Product: D
   Version: D1 & D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: clugd...@yahoo.com.au


--- Comment #0 from Don  2011-09-04 13:45:54 PDT ---
Found in Phobos. It's crashing while printing an error message. Error message
was printed correctly in 2.052 and earlier.


template curry(alias fun) {
int curry(int arg) {
return fun(arg, 5);
}
}

void foo() {
int f2(int a, int b) { return a + b; }

enum xe = 5;
enum fe = &curry!(f2);
static assert(fe(6) == 11);
}

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


[Issue 3813] Bad writeln of arrays

2011-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3813



--- Comment #16 from Andrei Alexandrescu  2011-09-04 
12:38:55 PDT ---
Let's use [,,,] for all ranges. Thanks Kenji for your work.

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