[Issue 9277] New: [diagnostic] bad error message on illegal cast inside foreach

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9277

   Summary: [diagnostic] bad error message on illegal cast inside
foreach
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: druntime
AssignedTo: nob...@puremagic.com
ReportedBy: dmitry.o...@gmail.com


--- Comment #0 from Dmitry Olshansky dmitry.o...@gmail.com 2013-01-07 
01:26:56 PST ---
On dmd 2.061 the following (illegal) program:

void main()
{
class Int
{
int _val;
this(int val){ _val = val; }
}
Int[] sink;

foreach(v; 0..5_000)
sink ~= [cast(Int)v]; //12
foreach(v; 0..5_000)
sink ~= cast(Int)v; //14
}

Produces:
bug.d(12): Error: e2ir: cannot cast v of type int to type bug.main.Int
bug.d(14): Error: e2ir: cannot cast v of type int to type bug.main.Int

The awful 'e2ir:' part of message seems to only trigger if v is coming from
foreach variable.

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


[Issue 8754] Function commonPrefix returns invalid string when passing two cyrillic utf-8 strings

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8754


Jonathan M Davis jmdavisp...@gmx.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jmdavisp...@gmx.com
 Resolution||DUPLICATE


--- Comment #1 from Jonathan M Davis jmdavisp...@gmx.com 2013-01-07 02:14:00 
PST ---
*** This issue has been marked as a duplicate of issue 8890 ***

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


[Issue 8890] std.algorithm.commonPrefix does not handle unicode correctly

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8890


Jonathan M Davis jmdavisp...@gmx.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 8890] std.algorithm.commonPrefix does not handle unicode correctly

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8890


Jonathan M Davis jmdavisp...@gmx.com changed:

   What|Removed |Added

 CC||lxyd.dl...@lxyd.net


--- Comment #3 from Jonathan M Davis jmdavisp...@gmx.com 2013-01-07 02:14:01 
PST ---
*** Issue 8754 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 9268] [ice-on-invalid] void assignment in fail44.d no longer caught in frontend

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9268


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

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-01-07 05:44:16 PST ---
https://github.com/D-Programming-Language/dmd/pull/1434

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


[Issue 9268] [ice-on-invalid] void assignment in fail44.d no longer caught in frontend

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9268



--- Comment #2 from Kenji Hara k.hara...@gmail.com 2013-01-07 06:30:43 PST ---
(In reply to comment #0)
 Maybe d_do_test should generally check the error messages for Internal error
 instead of just testing the exit value?

I added the code to check Internal error:  message in the pull request.

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


[Issue 6707] Error message for mismatch of const/non-const property functions needs to improve

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6707


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

   What|Removed |Added

 CC||dmitry.o...@gmail.com


--- Comment #9 from Kenji Hara k.hara...@gmail.com 2013-01-07 07:10:36 PST ---
*** Issue 8552 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 8552] Bogus diagnostic when member function call doesn't match constancy

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8552


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

   What|Removed |Added

 Resolution|FIXED   |DUPLICATE


--- Comment #3 from Kenji Hara k.hara...@gmail.com 2013-01-07 07:10:36 PST ---
(In reply to comment #2)
 Seems fixed in latest git head:
 
 $ dmd test.d
 test.d(30): Error: mutable method test.SimpleCaseEntry.isUpper is not callable
 using a const object
 test.d(31): Error: mutable method test.SimpleCaseEntry.isLower is not callable
 using a const object

The lack of information about qualifier mismatching is fixed by bug 6707.
After that, the error message is improved by fixing bug 1730.

Both are fixed in 2.061.

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

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


[Issue 9277] [diagnostic] bad error message on illegal cast inside foreach

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9277


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

   What|Removed |Added

   Keywords||diagnostic, pull
 CC||andrej.mitrov...@gmail.com
  Component|druntime|DMD
 AssignedTo|nob...@puremagic.com|andrej.mitrov...@gmail.com


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-07 
09:08:40 PST ---
https://github.com/D-Programming-Language/dmd/pull/1435

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


[Issue 3970] Problem with cast -1.0L == uint/ulong

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3970



--- Comment #2 from Don clugd...@yahoo.com.au 2013-01-07 09:07:42 PST ---
This passes on Linux32 and 64, on 1.076 and 2.061. Also tested on D1.073 so it
has been working for quite some time on Linux. Need to check if it is
Windows-specific.

void main() {
static assert((cast(ushort)(-1.0)) == 0x);
static assert((cast(ushort)(-1.0L)) == 0x);
static assert((cast(uint)(-1.0)) == 0x_);
static assert((cast(uint)(-1.0L)) == 0x_);
static assert((cast(ulong)(-1.0L)) == 0x___UL);

assert((cast(ushort)(-1.0)) == 0x);
assert((cast(ushort)(-1.0L)) == 0x);
assert((cast(uint)(-1.0)) == 0x_);
assert((cast(uint)(-1.0L)) == 0x_);
assert((cast(ulong)(-1.0L)) == 0x___UL);
}

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


[Issue 9191] Unhelpful error message on failing override

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9191


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

   What|Removed |Added

   Keywords||diagnostic, pull
 CC||andrej.mitrov...@gmail.com
 AssignedTo|nob...@puremagic.com|andrej.mitrov...@gmail.com


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-07 
09:25:22 PST ---
https://github.com/D-Programming-Language/dmd/pull/1436

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


[Issue 9277] [diagnostic] bad error message on illegal cast inside foreach

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9277


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

   What|Removed |Added

   Keywords|diagnostic, pull|
 AssignedTo|andrej.mitrov...@gmail.com  |nob...@puremagic.com


--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-07 
09:40:45 PST ---
Pull was wrong, this was not a diagnostic problem. The 'e2ir' is a minor ICE,
the error check should happen in the front-end. Once that is fixed this error
message will improve.

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


[Issue 9191] Unhelpful error message on failing override

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9191



--- Comment #2 from github-bugzi...@puremagic.com 2013-01-07 09:51:28 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5bcba1f0ff22786d47dacf7f24d9d9231291ef7c
Fixes Issue 9191 - Wrong diagnostic on failing override.

For failing overrides the compiler should look for similar symbols in the
base classes and interfaces, and not the current class.

https://github.com/D-Programming-Language/dmd/commit/870bc8690ae4d4898667fbcc572589e842869a32
Merge pull request #1436 from AndrejMitrovic/Fix9191

Issue 9191 - Wrong diagnostic on failing override

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


[Issue 9268] [ice-on-invalid] void assignment in fail44.d no longer caught in frontend

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9268



--- Comment #3 from github-bugzi...@puremagic.com 2013-01-07 10:05:54 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/97e936844677bedf0ab9a05739f63f843cddd155
fix Issue 9268 - [ice-on-invalid] void assignment in fail44.d no longer caught
in frontend

https://github.com/D-Programming-Language/dmd/commit/18e34e9d11f00d7078d13033d9845803eeb59027
Merge pull request #1434 from 9rnsr/fix9268

Issue 9268 - [ice-on-invalid] void assignment in fail44.d no longer caught in
frontend

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


[Issue 5243] dmd -run potentially removes user files

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5243



--- Comment #2 from Leandro Lucarella leandro.lucare...@sociomantic.com 
2013-01-07 10:46:33 PST ---
Can you(In reply to comment #1)
 Created an attachment (id=1170) [details]
 patch
 
 Possible patch added. I don't have a Posix build system to test it, and there
 should be a test-script (possibly in shell) to verify it works ok.

Can you convert this into a pull request? It will make reviewing more easy.

I can write the test case based on the one in the report.

All your changes are POSIX only, is the overwriting not happening on Windows?

Also, is extremely unlikely, but you can still overwrite unintended files, a
check to avoid overwriting anything should be done, but maybe that's much
harder to do because you have to change how the file is opened, not just the
filename.

Finally, any reason for declaring getuid() manually instead of including the
appropriate headers?

Thanks for addressing this issue!

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


[Issue 9047] Expression requiring std.math fails with function-local import

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9047


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

   What|Removed |Added

   Keywords|diagnostic  |rejects-valid
 CC||andrej.mitrov...@gmail.com
 AssignedTo|nob...@puremagic.com|andrej.mitrov...@gmail.com
Summary|Bad error message with  |Expression requiring
   |power ^^ operator   |std.math fails with
   ||function-local import
 OS/Version|Windows |All
   Severity|minor   |normal


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-07 
10:51:03 PST ---
I don't think this is a diagnostic bug, it's a problem where the compiler
rewrites the call to:

void main() {
import std.math;
auto f = (double a, double b) = .std.math.pow(a, b);
}

This is why you get a undefined identifier std message.

Using the .dot won't work here because the import is function-local.

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


[Issue 3970] Problem with cast -1.0L == uint/ulong

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3970


Simen Kjaeraas simen.kja...@gmail.com changed:

   What|Removed |Added

 CC||simen.kja...@gmail.com


--- Comment #3 from Simen Kjaeraas simen.kja...@gmail.com 2013-01-07 11:02:17 
PST ---
Just tested on Windows. First two asserts and static asserts pass, the rest
fail.

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


[Issue 9047] Expression requiring std.math fails with function-local import

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9047



--- Comment #2 from bearophile_h...@eml.cc 2013-01-07 11:14:42 PST ---
(In reply to comment #1)
 I don't think this is a diagnostic bug, it's a problem where the compiler
 rewrites the call to:
 
 void main() {
 import std.math;
 auto f = (double a, double b) = .std.math.pow(a, b);
 }
 
 This is why you get a undefined identifier std message.
 
 Using the .dot won't work here because the import is function-local.

The code the performs that rewriting should verify that the correctness
conditions are satisfied, and otherwise possibly rewrite the ^^ with something
that shows a good error message.

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


[Issue 9278] New: ICE todt.c:692 when float containing struct is defined after use

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9278

   Summary: ICE todt.c:692 when float containing struct is defined
after use
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: Linux
Status: NEW
  Keywords: ice
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: wyatt@gmail.com


--- Comment #0 from Wyatt wyatt@gmail.com 2013-01-07 12:17:42 PST ---
Created an attachment (id=1176)
Minimalish test case with comments.

Attached code sample builds in 2.060; ICE in 2.061

I didn't try types other than string, int, char, and float; other bugs may
exist.

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


[Issue 5243] dmd -run potentially removes user files

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5243



--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-07 
12:31:42 PST ---
(In reply to comment #2)
 Can you convert this into a pull request? It will make reviewing more easy.

I'll do it later tonight.

 All your changes are POSIX only, is the overwriting not happening on Windows?

No because executables on win32 always end with .exe. Even if you do dmd
-oftest, DMD will still append an .exe .

 Finally, any reason for declaring getuid() manually instead of including the
 appropriate headers?

The DMC header is unistd.h, but the front-end is also used by GDC and LDC, I
don't know which headers they use for this function. It seemed easiest to just
declare the function rather than to include an entire header (remember that
includes are costly for compile-times in C++).

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


[Issue 7659] std.stdio.File.close() erases file.name

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7659


Mike Wey mike-...@planet.nl changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||mike-...@planet.nl
 Resolution||FIXED


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


[Issue 9047] Expression requiring std.math fails with function-local import

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9047



--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-07 
14:59:29 PST ---
https://github.com/D-Programming-Language/dmd/pull/1438

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


[Issue 9047] Expression requiring std.math fails with function-local import

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9047



--- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-07 
15:13:35 PST ---
*** Issue 4845 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 4845] Bad error message with missing math import for ^^

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4845


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-01-07 
15:13:35 PST ---
The pull for 9047 fixes the error message.

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

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


[Issue 8635] Allow postfix expressions for new

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8635


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||aziz.koek...@gmail.com


--- Comment #9 from yebblies yebbl...@gmail.com 2013-01-08 12:08:11 EST ---
*** Issue 8826 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 8826] PostExpression cannot follow NewExpression

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8826


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||yebbl...@gmail.com
 Resolution||DUPLICATE


--- Comment #1 from yebblies yebbl...@gmail.com 2013-01-08 12:08:10 EST ---
*** This issue has been marked as a duplicate of issue 8635 ***

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


[Issue 5091] main runs after unittests

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5091


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-01-07 
17:14:36 PST ---
You can override this behavior by defining your own unittest function:

import core.runtime;
import std.stdio;
import std.string;
import std.path;

bool testRunner()
{
foreach (m; ModuleInfo)
{
if (m is null)
continue;

if (auto fp = m.unitTest)
{
try
{
fp();
}
catch (Throwable e)
{
writeln(e);
}
}
}

// stop execution after tests are done
return false;
}

shared static this()
{
Runtime.moduleUnitTester(testRunner);
}

unittest
{
writeln(in unittest);
assert(1);
}

void main()
{
writeln(not in main);
}

--

I've written a similar test system where I can also set these at runtime via
getopt switches:

- specify which modules to run the tests on (--testMods=foo.bar)
- ditto but set modules which should *not* have their tests ran on
(--ignoreMods=foo.bar.doo)
- specify whether to run the unittests, and whether to run main() if the tests
were successful

I might write a DWiki entry later on how to do this if there's any interest.

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


[Issue 4813] trait for getting at access modifiers

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4813


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 5450] no match for implicit super() call in constructor

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5450


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

   What|Removed |Added

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


--- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-07 
18:37:59 PST ---
(In reply to comment #3)
 The only bug here is it could be a better error message.

A shame I haven't noticed this report before fixing Issue 8928. The error is
now:

Error: constructor foo.Bar.this no match for implicit super() call in
implicitly generated constructor

But I could revert the fix for 8298 and instead avoid generating the ctor at
all and printing:

Error: class foo.Bar cannot implicitly generate a default ctor when base class
foo.Foo is missing a default ctor

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


[Issue 5450] no match for implicit super() call in constructor

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5450


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

   What|Removed |Added

   Keywords||pull
 AssignedTo|nob...@puremagic.com|andrej.mitrov...@gmail.com


--- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-07 
18:45:54 PST ---
https://github.com/D-Programming-Language/dmd/pull/1439

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


[Issue 9280] New: Runtime range violation with named capture groups in regex

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9280

   Summary: Runtime range violation with named capture groups in
regex
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: nine5...@lantea.net


--- Comment #0 from nine5...@lantea.net 2013-01-07 19:05:56 PST ---
Created an attachment (id=1177)
Source code for test case

Given the attached code (also available at
https://gist.github.com/5a0b4685c6d316620c86 ) there is a range error when
trying to access a named capture group when using a static regex object.

When removing static from the declaration of the regex object there is no range
error on runtime.

The attached test case is run as follows.

$ dmd -run regex.d
c[1]  = a
c[nick] = a

$ dmd -version=Static -run regex.d
c[1]  = a
core.exception.RangeError@std.regex(2145): Range violation

regex(_d_array_bounds+0x16) [0x80c9746]
regex() [0x80ce916]
regex(@trusted uint
std.regex.lookupNamedGroup!(immutable(char)[]).lookupNamedGroup(std.regex.NamedGroup[],
immutable(char)[])+0x5a) [0x80c5002]
regex(@trusted immutable(char)[] std.regex.Captures!(immutable(char)[],
uint).Captures.opIndex!(immutable(char)[]).opIndex(immutable(char)[])+0x48)
[0x80c4f20]
regex(_Dmain+0xa5) [0x809ef79]
regex(extern (C) int rt.dmain2.main(int, char**).void runMain()+0x14)
[0x80c9d20]
regex(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void
delegate())+0x18) [0x80c9830]
regex(extern (C) int rt.dmain2.main(int, char**).void runAll()+0x32)
[0x80c9d62]
regex(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void
delegate())+0x18) [0x80c9830]
regex(main+0x94) [0x80c97e4]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xb75c94d3]


The bug appears on both dmd 2.059 (on ubuntu) and dmd 2.061 (on archlinux).

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


[Issue 5003] regex(replace with delegate) sample doesn't work

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5003


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

   What|Removed |Added

 AssignedTo|and...@erdani.com   |dmitry.o...@gmail.com


--- Comment #3 from Andrei Alexandrescu and...@erdani.com 2013-01-07 23:01:30 
PST ---
Assigning to Dmitry.

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


[Issue 6066] std.container: BinaryHeap interface is broken.

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6066



--- Comment #1 from Andrei Alexandrescu and...@erdani.com 2013-01-07 23:31:58 
PST ---
https://github.com/D-Programming-Language/phobos/pull/1057

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


[Issue 5773] sort() and topN() fail on sliced/resized array of tuples

2013-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5773


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

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


--- Comment #6 from Andrei Alexandrescu and...@erdani.com 2013-01-07 23:38:59 
PST ---
Fixed as far back as 2.059.

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