[Issue 5730] __traits(compiles) does not handle "variable has scoped destruction, cannot build closure" error correctly

2011-03-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5730


Don  changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #4 from Don  2011-03-12 11:48:11 PST ---
This is happening because the "has scoped destruction" error is generated in
the glue layer, not in the front-end. The same issue applies to any error
message generated in e2ir.c, toir.c, or s2ir.c.

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


[Issue 5732] New: Windows installer 1.067 creates incorrect target for Start menu link

2011-03-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5732

   Summary: Windows installer 1.067 creates incorrect target for
Start menu link
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Severity: minor
  Priority: P2
 Component: installer
AssignedTo: nob...@puremagic.com
ReportedBy: commonm...@seznam.cz


--- Comment #0 from Simon Says  2011-03-12 10:05:44 PST 
---
When I install DMD 2 from the Windows 1-click installer and choose to install
only D2 with option to create links in start menu, the Documentation link is
created pointing incorrectly to (default path) "C:\D\dmd\...".

Setting the link's target to "C:\D\dmd2\..." obviously fixes the problem, but
shouldn't be there different links to appropriate versions of documentation?

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


[Issue 5731] std.datetime.SysTime prints UTC offsets backwards

2011-03-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5731


Jonathan M Davis  changed:

   What|Removed |Added

Summary|WindowsTimeZone has offsets |std.datetime.SysTime prints
   |from UTC backwards  |UTC offsets backwards
 OS/Version|Windows |All


--- Comment #1 from Jonathan M Davis  2011-03-12 03:47:36 
PST ---
Okay. So, this isn't a WindowsTimeZone problem. It's a problem with SysTime's
string functions (toISOExtendedString in the example, but it's the same for all
of them) where they get the UTC offset backwards.

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


[Issue 5730] __traits(compiles) does not handle "variable has scoped destruction, cannot build closure" error correctly

2011-03-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5730


Max Samukha  changed:

   What|Removed |Added

Summary|Error: variable has scoped  |__traits(compiles) does not
   |destruction, cannot build   |handle "variable has scoped
   |closure |destruction, cannot build
   ||closure" error correctly


--- Comment #3 from Max Samukha  2011-03-12 02:37:00 
PST ---
Changed the title

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


[Issue 5730] Error: variable has scoped destruction, cannot build closure

2011-03-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5730


Max Samukha  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |


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


[Issue 5730] Error: variable has scoped destruction, cannot build closure

2011-03-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5730



--- Comment #2 from Max Samukha  2011-03-12 01:53:09 
PST ---
No, no. The bug is not about the impossibility to build a closure. It is about
__traits(compiles) not handling the compilation error properly. It should
suppress the error and evaluate to false.  

Another example:

struct S
{
~this()
{
}
}

void main()
{
S s;
static if (__traits(compiles, { auto s1 = s; }))
pragma(msg, "Can build closure");
else
pragma(msg, "Cannot build closure");
}

The compiler outputs:
Can build closure
Error: variable test.main.s has scoped destruction, cannot build closure


Instead, the above should compile successfully, printing "Cannot build closure"
at compile time.

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


[Issue 5730] Error: variable has scoped destruction, cannot build closure

2011-03-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5730


Walter Bright  changed:

   What|Removed |Added

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


--- Comment #1 from Walter Bright  2011-03-12 
00:50:04 PST ---
Right. {auto s1=s;} is a delegate literal. Delegate literals need to be able to
survive the end of the function they are defined inside. Since s is destroyed
upon the exit from main(), then this will not work, hence the error message.

This is expected behavior, not a bug.

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


[Issue 5731] WindowsTimeZone has offsets from UTC backwards

2011-03-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5731


Jonathan M Davis  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED


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


[Issue 5731] New: WindowsTimeZone has offsets from UTC backwards

2011-03-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5731

   Summary: WindowsTimeZone has offsets from UTC backwards
   Product: D
   Version: unspecified
  Platform: All
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: jmdavisp...@gmx.com


--- Comment #0 from Jonathan M Davis  2011-03-12 00:29:11 
PST ---
This program:

import std.datetime;
import std.stdio;

void main()
{
writeln(SysTime(Date.init, WindowsTimeZone.getTimeZone("Pacific Standard
Time")));
writeln(SysTime(Date.init, WindowsTimeZone.getTimeZone("Eastern Standard
Time")));
writeln(SysTime(Date.init, WindowsTimeZone.getTimeZone("Greenwich Standard
Time")));
writeln(SysTime(Date.init, WindowsTimeZone.getTimeZone("Romance Standard
Time")));
}


prints this:

0001-Jan-01 00:00:00+08:00
0001-Jan-01 00:00:00+05:00
0001-Jan-01 00:00:00+00:00
0001-Jan-01 00:00:00-01:00


Notice that the offsets are all the reverse of what they're supposed to be (+8
instead of -8, +5 instead of -5, etc.).

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