[Issue 6289] Make slices of const/immutable arrays mutable (but keep the elements const/immutable)

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


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords||patch
 CC||yebbl...@gmail.com


--- Comment #1 from yebblies yebbl...@gmail.com 2011-07-12 16:41:31 EST ---
https://github.com/D-Programming-Language/dmd/pull/236

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


[Issue 5830] Bug in alias resolution for template value parameters in is()?

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


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

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


--- Comment #2 from yebblies yebbl...@gmail.com 2011-07-12 18:31:22 EST ---
*** This issue has been marked as a duplicate of issue 2355 ***

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


[Issue 2355] is() doesn't resolve aliases before template matching

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


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||c...@klickverbot.at


--- Comment #2 from yebblies yebbl...@gmail.com 2011-07-12 18:31:22 EST ---
*** Issue 5830 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 6293] New: [Regression 2.054] 'pure' does not work with member of array of aggregrate

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

   Summary: [Regression 2.054] 'pure' does not work with member of
array of aggregrate
   Product: D
   Version: D2
  Platform: Other
OS/Version: All
Status: NEW
  Keywords: rejects-valid
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: kenn...@gmail.com


--- Comment #0 from kenn...@gmail.com 2011-07-12 01:38:45 PDT ---
Test case
---
class C6293 {
int token;
}
struct S6293 {
const(C6293)[] tokens;
void f() const pure {
const(C6293) a = tokens[0];
int b = a.token;   // -- separating it is ok.
int c = tokens[0].token;   // -- cannot access mutable data 'token'
}
}
---
x.d(9): Error: pure nested function 'f' cannot access mutable data 'token'
---

If that 'b' can be accessed in a 'pure' function, there's no reason 'c' cannot.

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


[Issue 2355] is() doesn't resolve aliases before template matching

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


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords|wrong-code  |patch, rejects-valid
 CC||yebbl...@gmail.com
   Platform|x86 |All
Version|2.019   |D2
 OS/Version|Windows |All


--- Comment #3 from yebblies yebbl...@gmail.com 2011-07-12 18:41:18 EST ---
https://github.com/D-Programming-Language/dmd/pull/238

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


[Issue 4953] Regression(2.031): templates don't do implicit conversion properly

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


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords||patch
 CC||yebbl...@gmail.com
   Platform|Other   |All
 OS/Version|Linux   |All


--- Comment #5 from yebblies yebbl...@gmail.com 2011-07-12 20:18:23 EST ---
https://github.com/D-Programming-Language/dmd/pull/239

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


[Issue 5596] SortedRange regression

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


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords||rejects-valid
 CC||yebbl...@gmail.com
   Platform|Other   |All
 OS/Version|Windows |All


--- Comment #4 from yebblies yebbl...@gmail.com 2011-07-12 20:36:47 EST ---
Reduced:


struct X(alias a) { void fx() { a = 4; } int a; }

alias X!a x;

void y(alias b)() { X!b g; }

void main()
{
y!(a)();
}

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


[Issue 5596] Regression(2.052): Different template alias parameters to the same literal result in different template instances

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


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords||patch
Summary|SortedRange regression  |Regression(2.052):
   ||Different template alias
   ||parameters to the same
   ||literal result in different
   ||template instances


--- Comment #5 from yebblies yebbl...@gmail.com 2011-07-12 21:25:54 EST ---
https://github.com/D-Programming-Language/dmd/pull/240

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


[Issue 5134] std.algorithm.startsWith won't accept var from in as first arg

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


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||yebbl...@gmail.com
  Component|DMD |Phobos


--- Comment #1 from yebblies yebbl...@gmail.com 2011-07-12 22:17:02 EST ---
This is not a regression in dmd, but the result of fixing a dmd
accepts-invalid.
I'll leave it up to the phobos developers to decide if this is a regression or
not.  There are other similar bugs in bugzilla, and also enhancement requests
for dmd that may make this valid code again.

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


[Issue 5373] Regression (2.051) CTFE and std.string.replace() causes Bad binary function q{a == b}..

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


Trass3r mrmoc...@gmx.de changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #9 from Trass3r mrmoc...@gmx.de 2011-07-12 05:21:13 PDT ---
I think we can close this one now.

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


[Issue 6259] Regression(2.054 beta): Property getters returning ref const() cause setters to be hidden

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


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords||patch, rejects-valid
 CC||yebbl...@gmail.com
   Platform|Other   |All
Version|unspecified |D2
Summary|Property getters returning  |Regression(2.054 beta):
   |ref const() cause setters   |Property getters returning
   |to be hidden|ref const() cause setters
   ||to be hidden
 OS/Version|Windows |All


--- Comment #2 from yebblies yebbl...@gmail.com 2011-07-12 22:56:19 EST ---
https://github.com/D-Programming-Language/dmd/pull/241

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


[Issue 5939] Cannot copy std.algorithm.map

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


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||yebbl...@gmail.com
  Component|DMD |Phobos
   Platform|Other   |All
 AssignedTo|nob...@puremagic.com|and...@metalanguage.com
 OS/Version|Windows |All


--- Comment #6 from yebblies yebbl...@gmail.com 2011-07-12 23:00:10 EST ---
Maybe this is intentional and therefore not a bug?  It doesn't make any sense
for private structs to be able to be default constructed, but this is a useful
thing to do with the result of map.  Andrei?

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


[Issue 3332] Mixin a constructor with a construct already present fails

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


Trass3r mrmoc...@gmx.de changed:

   What|Removed |Added

 CC||mrmoc...@gmx.de
   Platform|x86 |All
Version|1.047   |D1  D2
 OS/Version|Mac OS X|All


--- Comment #2 from Trass3r mrmoc...@gmx.de 2011-07-12 06:13:14 PDT ---
Also fails on 2.054, Linux x64

test.d(21): Error: constructor test.A.this () is not callable using argument
types (int)
test.d(21): Error: expected 0 arguments, not 1 for non-variadic function type
A()

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


[Issue 5939] Cannot copy std.algorithm.map

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



--- Comment #7 from Andrei Alexandrescu and...@metalanguage.com 2011-07-12 
08:39:19 PDT ---
This is one of those things that could go either way. I see merit in
restricting the result of map for direct consumption, without allowing
creating an empty result without a corresponding map call.

On the other hand, it's often impossible to do so. Consider the many filtering
functions that take a range and build additional functionality on top of it.
Such functions need to create a range that contains the subject range as a
member. It's reasonable to require that map can be combined with such
functions.

I think it's best to fix this - e.g. by storing a null frame pointer in the
default-constructed object.

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


[Issue 6295] New: DMD 2.054 segfaults

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

   Summary: DMD 2.054 segfaults
   Product: D
   Version: D2
  Platform: All
OS/Version: Linux
Status: NEW
  Severity: blocker
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: pun...@coverify.org


--- Comment #0 from Puneet Goel pun...@coverify.org 2011-07-12 09:47:22 PDT 
---
Here is a reduced test case. Compiles and runs fine with dmd-2.053, segfaults
at compile stage for dmd 1.054. Compiles and runs fine with dmd-2.054 if I take
out size_t N template parameter. Also compiles fine with 2.054 if printFoo is
defined outside the main function.

import std.stdio;
struct Foo(IF, size_t N) {}
interface Bar {}
void main() {
  void printFoo(T: Foo!(IF, N), IF, size_t N)(T foo)
if(is(IF == interface)) {
writeln(Type: , T.stringof);
  }
  Foo!(Bar, 1) foo;
  printFoo(foo);
}

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


[Issue 6295] DMD 2.054 segfaults

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


Puneet Goel pun...@coverify.org changed:

   What|Removed |Added

   Severity|blocker |normal


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


[Issue 6296] New: Assertion failure: '0' on line 1121 in file 'glue.c'

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

   Summary: Assertion failure: '0' on line 1121 in file 'glue.c'
   Product: D
   Version: D1
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: blocker
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: verylonglogin@gmail.com


--- Comment #0 from Denis verylonglogin@gmail.com 2011-07-12 10:03:46 PDT 
---
Created an attachment (id=1006)
Bug testcase

Broken is(typeof(...)) is a realy blocker for me.

I didn't know where was a problem since dmd 1.067 where it was introduced.
And this bug report is the merit of DustMite:
702 КБ of my D sources - few hours with DustMite (looks like it finally
crashed) - 63.2 КБ - some time with DustMite - 2.33 КБ - some time by hands
- 96 bytes.

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


[Issue 6295] DMD 2.054 segfaults

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


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #1 from bearophile_h...@eml.cc 2011-07-12 10:04:10 PDT ---
Simplified code:


struct Foo(int N) {}
void main() {
void bar(T: Foo!(N), int N)(T) {}
}

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


[Issue 6295] [Regression 2.054] Segfault in checkPurity() of template value parameter

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


kenn...@gmail.com changed:

   What|Removed |Added

   Keywords||ice-on-valid-code, patch
 CC||kenn...@gmail.com
Summary|DMD 2.054 segfaults |[Regression 2.054] Segfault
   ||in checkPurity() of
   ||template value parameter
   Severity|normal  |regression


--- Comment #2 from kenn...@gmail.com 2011-07-12 10:48:23 PDT ---
DMD pull #242.

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

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


[Issue 5134] std.algorithm.startsWith won't accept var from in as first arg

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


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

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||jmdavisp...@gmx.com
 Resolution||INVALID


--- Comment #2 from Jonathan M Davis jmdavisp...@gmx.com 2011-07-12 11:25:38 
PDT ---
Of course startsWith won't accept something which was an in parameter. That
would make it const. And a const range is useless. startsWith could work for
const arrays if templates were smart enough to realize that (see bug# 6148),
but they're not. They instantiate with the exact type that you give them, and a
const array can't have popFront called on it, so it's useless in a range-based
function.

Now, if the fix for bug# 6289 gets pulled in, then it'll be possible to use
const arrays with range-based functions by slicing them

void foo(in string str)
{
startsWith(str[], a);
}

but as long as a slice of an array is the exact same type as the original
instead of making the slice mutable (leaving the elements at the appropriate
level of mutability of coures - immutable in the case of string), that doesn't
work. You can cast the string - startsWith(cast(string)str, a) - and it
should work just fine, but as long str is const, it won't. So, this is not a
bug that's going to be fixed by changing anything with startsWith. It's an
inherent limitation in the language with regards to templates. Improving the
situation with slicing const/immutable arrays should help, because then you can
just slice them (as you would have to do with a static array), but until then,
a cast is your best option.

Of course, I would point out that having a string be in is of debatable value
in the first place, since the original array can't be altered anyway. All it
does is make it so that str can't be reassigned to another string inside of
foo. Granted, you may want that, but in plenty of cases, it really doesn't buy
you much.

So, this bug really isn't a bug. Fixing bug# 6289 would make slicing the string
work, which would effectively fix this issue, and if bug# 6148 were ever
implemented, then that would definitely fix it (though it's questionable
whether that's ever going to happen), but as it stands, startsWith isn't doing
anything wrong. If it worked before, it was a bug in dmd.

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


[Issue 6297] New: cast() does not remove const or immutable on arrays and pointers

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

   Summary: cast() does not remove const or immutable on arrays
and pointers
   Product: D
   Version: D2
  Platform: Other
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: schvei...@yahoo.com


--- Comment #0 from Steven Schveighoffer schvei...@yahoo.com 2011-07-12 
11:46:14 PDT ---
cast() is supposed to remove all attributes from a type, but in the case of
arrays, it does nothing to the tail.

I think cast() should remove even the tail.

Note that arrays *already* implicitly cast to their tail versions.  i.e.:

const(T[]) implicitly casts to const(T)[]
immutable(T[]) implicitily casts to immutable(T)[]

so to have:

cast()const(T[]) result in const(T)[] serves no purpose, I need no cast there.

The same goes for pointers, and if they are ever implemented, tail-const object
references.

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


[Issue 6298] New: ref breaks struct immutability

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

   Summary: ref breaks struct immutability
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: accepts-invalid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-07-12 11:52:22 PDT ---
With DMD 2.054 this code compiles and runs, but I think this is not good:


struct Foo {
int x;
}
void bar(ref Foo f) {
f.x++;
}
void main() {
immutable Foo f;
bar(f);
}

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


[Issue 6299] New: Auto constructor for heap structs too

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

   Summary: Auto constructor for heap structs too
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: rejects-valid
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-07-12 11:55:14 PDT ---
Regarding Removing limitations, I'd like this to compile with no need to
write a constructor:


struct Foo { int x; }
void main() {
auto f = new Foo(1);
}


In DMD 2.054 this gives:
test.d(3): Error: no constructor for Foo

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


[Issue 6295] [Regression 2.054] Segfault in checkPurity() of template value parameter

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



--- Comment #3 from bearophile_h...@eml.cc 2011-07-12 12:11:47 PDT ---
(In reply to comment #2)
 DMD pull #242.
 
 https://github.com/D-Programming-Language/dmd/pull/242

That was fast :-)

A limited form of typestate (see bug 4571 ) might help D user code avoid many
null reference bugs.

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


[Issue 6295] [Regression 2.054] Segfault in checkPurity() of template value parameter

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



--- Comment #4 from kenn...@gmail.com 2011-07-12 12:17:33 PDT ---
(In reply to comment #3)
 (In reply to comment #2)
  DMD pull #242.
  
  https://github.com/D-Programming-Language/dmd/pull/242
 
 That was fast :-)
 
 A limited form of typestate (see bug 4571 ) might help D user code avoid many
 null reference bugs.

Typestates in D cannot help NULL dereferencing bugs in DMD which is written in
C++.

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


[Issue 6300] New: Returning a cast(immutable) struct erroneously calls a matching constructor

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

   Summary: Returning a cast(immutable) struct erroneously calls a
matching constructor
   Product: D
   Version: unspecified
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: lud...@informatik.uni-luebeck.de


--- Comment #0 from S�nke Ludwig lud...@informatik.uni-luebeck.de 2011-07-12 
12:40:53 PDT ---
The following snipped fails to compile. What seems to happen is that the return
statement implicitly calls the constructor which in turn returns a mutable S
which is not implicitly castable to immutable - thus the error.

Happens since DMD 2.054

---
struct S {
int[] c;
this(in S){}
immutable(S) f() const {
S s;
return cast(immutable)s;
// the following works:
//immutable(S) sr = cast(immutable)s;
//return sr;
}
}
---

dbug2.d(6): Error: cannot implicitly convert expression ((immutable
immutable(S) __ctmp3 = 0;
 , __ctmp3).this(s)) of type S to immutable(S)


.. leaving the severity as normal, as there is an easy workaround

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


[Issue 6298] ref breaks struct immutability

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


Steven Schveighoffer schvei...@yahoo.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||schvei...@yahoo.com
 Resolution||DUPLICATE


--- Comment #1 from Steven Schveighoffer schvei...@yahoo.com 2011-07-12 
13:05:59 PDT ---
*** This issue has been marked as a duplicate of issue 5493 ***

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


[Issue 5493] Able to overwrite immutable data by passing through ref function parameter

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



--- Comment #13 from Steven Schveighoffer schvei...@yahoo.com 2011-07-12 
13:05:59 PDT ---
*** Issue 6298 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 6284] [Regression 2.054] 'pure' does not work with 'with' statement

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



--- Comment #3 from kenn...@gmail.com 2011-07-12 13:22:25 PDT ---
DMD pull #243.

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

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


[Issue 6293] [Regression 2.054] 'pure' does not work with member of array of aggregrate

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



--- Comment #1 from kenn...@gmail.com 2011-07-12 13:22:49 PDT ---
DMD pull #243.

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

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


[Issue 6301] New: Cannot 'zip'/'retro'/'stride' etc. a range having 'ulong' length.

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

   Summary: Cannot 'zip'/'retro'/'stride' etc. a range having
'ulong' length.
   Product: D
   Version: D2
  Platform: Other
OS/Version: Mac OS X
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: kenn...@gmail.com


--- Comment #0 from kenn...@gmail.com 2011-07-12 14:24:57 PDT ---
Test case:

--
import std.range;

void f() {
auto LL = iota(1L, 1000L);
auto z = zip(LL, LL);
auto r = retro(LL);
auto pb = popBackN(LL, 2);
auto s = stride(LL, 2);
auto rd = radial(LL);
}
--

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


[Issue 6301] Cannot 'zip'/'retro'/'stride' etc. a range having 'ulong' length.

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



--- Comment #1 from kenn...@gmail.com 2011-07-12 15:21:17 PDT ---
Phobos pull #142.

https://github.com/D-Programming-Language/phobos/pull/142

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


[Issue 6302] New: Function imports in debug blocks crashes compiler

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

   Summary: Function imports in debug blocks crashes compiler
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: blocker
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2011-07-12 
17:12:17 PDT ---
module dmd_crash;

void main()
{
debug
{
import std.math;
FloatingPointControl fpc;
fpc.enableExceptions(FloatingPointControl.severeExceptions);
}
}

 dmd -debug dmd_crash.d

---
dmd.exe - Application Error
---
The instruction at 0x00406be3 referenced memory at 0x0030. The memory
could not be read.


Click on OK to terminate the program
Click on CANCEL to debug the program
---
OK   Cancel   
---

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


[Issue 6303] New: Order of float declaration changes NaN throwing behavior

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

   Summary: Order of float declaration changes NaN throwing
behavior
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2011-07-12 
17:23:32 PDT ---
import std.math;
void main()
{
   float foo;
   FloatingPointControl fpc;
   fpc.enableExceptions(FloatingPointControl.allExceptions);

   //~ float foo;
   auto x = foo / 0;
}

This won't throw unless you replace the first foo declaration with the second
one. This only happens with NaNs. If you initialize the float and do an invalid
operation then it throws:

import std.math;
void main()
{
   float foo = 0.0f;  // initialize it first
   FloatingPointControl fpc;
   fpc.enableExceptions(FloatingPointControl.allExceptions);

   auto x = foo / 0;  // throws, as it should
}

So this odd behavior only happens with NaNs.

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


[Issue 6302] Function imports in debug blocks crashes compiler

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


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

   What|Removed |Added

   Severity|blocker |critical


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2011-07-12 
17:45:41 PDT ---
Lowering to critical as I can use my own version statements to work around
this:

void main()
{
version (Debug)
{
import std.math;
FloatingPointControl fpc;
fpc.enableExceptions(FloatingPointControl.severeExceptions);
}
}

 dmd -version=Debug dmd_crash.d

This will work.

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


[Issue 6304] New: DMD does not recognize size_t parameter type while type matching

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

   Summary: DMD does not recognize size_t parameter type while
type matching
   Product: D
   Version: D2
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: pun...@coverify.org


--- Comment #0 from Puneet Goel pun...@coverify.org 2011-07-12 18:21:28 PDT 
---
Here is a small test case. I get this error on dmd 2.054/053/052/051.
Error vanishes if I replace size_t with ulong on line 6 (inside the is
expression).

$ dmd struct.d
Error: undefined identifier size_t
struct.d(11): Error: template instance struct.printFoo!(Foo!(Bar,1)) error
instantiating


// struct.d
import std.stdio;
struct Foo(IF, size_t N) {}
interface Bar {}
void printFoo(T)(T foo) {
  static if(is(T L: Foo!(IF, N), IF, size_t N)) {
  writeln(Type: , T.stringof);
}
}
void main() {
  Foo!(Bar, 1) foo;
  printFoo(foo);
}

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


[Issue 6304] DMD does not recognize size_t parameter type while type matching

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


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

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


--- Comment #1 from yebblies yebbl...@gmail.com 2011-07-13 11:25:35 EST ---
*** This issue has been marked as a duplicate of issue 2355 ***

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


[Issue 2355] is() doesn't resolve aliases before template matching

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


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||pun...@coverify.org


--- Comment #4 from yebblies yebbl...@gmail.com 2011-07-13 11:25:35 EST ---
*** Issue 6304 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: ---