[Issue 3334] std.demangle doesn't parse ref, pure, nothrow

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


kenn...@gmail.com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||kenn...@gmail.com
 Resolution||FIXED


--- Comment #4 from kenn...@gmail.com 2011-04-23 02:16:46 PDT ---
Looks like this has been fixed.

--
module x;
import core.demangle, std.traits;

@property ref pure nothrow int foo(ref int z) {
return z;
}
@safe void bar() {
}
@trusted void baz() {
}

void main() {
assert(demangle(mangledName!foo) == pure nothrow ref @property int
x.foo(ref int));
assert(demangle(mangledName!bar) == @safe void x.bar());
assert(demangle(mangledName!baz) == @trusted void x.baz());
}
--

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


[Issue 5872] New: core.demangle, core.sys.*, core.stdc.* not documented

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

   Summary: core.demangle, core.sys.*, core.stdc.* not documented
   Product: D
   Version: D2
  Platform: All
   URL: http://www.digitalmars.com/d/2.0/phobos/phobos.html
OS/Version: All
Status: NEW
  Severity: minor
  Priority: P4
 Component: websites
AssignedTo: nob...@puremagic.com
ReportedBy: kenn...@gmail.com


--- Comment #0 from kenn...@gmail.com 2011-04-23 05:30:56 PDT ---
As titled, the module core.demangle and the subpackages core.sys.* and
core.stdc.* are not found in the link in
http://www.digitalmars.com/d/2.0/phobos/phobos.html. They should be documented.

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


[Issue 5873] New: Cannot call iota() on long with step

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

   Summary: Cannot call iota() on long with step
   Product: D
   Version: D2
  Platform: All
   URL: https://github.com/D-Programming-Language/phobos/commi
t/3e6679b2#L3L3905
OS/Version: All
Status: NEW
  Keywords: rejects-valid
  Severity: regression
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: kenn...@gmail.com


--- Comment #0 from kenn...@gmail.com 2011-04-23 08:15:22 PDT ---
(This is a problem on Phobos git master introduced since commit 3e6679b2. The
code works fine on 2.052)

Test case:


import std.range;
void main() {
iota(1L, 10L); // OK
iota(1L, 10L, 3);  // Error
}


Currently it shows the error

/usr/include/phobos/std/range.d(3902): Error: cannot implicitly convert
expression (unsigned((this.pastLast - this.current) / cast(long)this.step)) of
type ulong to uint
x.d(4): Error: template instance std.range.iota!(long,long,int) error
instantiating

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


[Issue 2460] Ref functions can't be template functions.

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


kenn...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||kenn...@gmail.com
 Resolution||FIXED


--- Comment #3 from kenn...@gmail.com 2011-04-23 09:31:02 PDT ---
Looks like this has been fixed. All programs in this page compiles for me. 


struct Foo {
double x, y;

ref double get(Args...)(Args args) if (args.length == 4) {
return x;
}
}
void main() {
Foo f;
f.get(4,5,6,7) = 6;
assert(f.x == 6);
}


Can we fix this std.complex bug then?

Some operators, such as opAssign and opOpAssign, should return by ref, but
currently don't. This will be implemented as soon as DMD bug 2460 is fixed.

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


[Issue 5874] New: alloca should be pure

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

   Summary: alloca should be pure
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha dsim...@yahoo.com 2011-04-23 12:28:36 PDT ---
import core.stdc.stdlib;

void doAlloca() pure {
alloca(8);
}

void main() {
doAlloca();
}

Error: pure function 'doAlloca' cannot call impure function 'alloca'

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


[Issue 5875] New: cannot implicitly convert delegate to const(delegate)

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

   Summary: cannot implicitly convert delegate to const(delegate)
   Product: D
   Version: D2
  Platform: Other
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: necrom...@gmail.com


--- Comment #0 from Max Klyga necrom...@gmail.com 2011-04-23 12:35:10 PDT ---
void main() {
void function() a;
void delegate() b;
const (void function()) c = a; //ok
const (void delegate()) d = b; //error
}

This behavior breaks std.algorithm.move, which makes std.container not work
with delegate types.

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


[Issue 4460] Regression(2.036) ICE(e2ir.c) when compiling foreach over associative array literal

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


Iain Buclaw ibuc...@ubuntu.com changed:

   What|Removed |Added

   Keywords||patch
 CC||ibuc...@ubuntu.com


--- Comment #6 from Iain Buclaw ibuc...@ubuntu.com 2011-04-23 12:39:40 PDT ---
Patch:

diff --git a/src/mtype.c b/src/mtype.c
index f8ad06e..1d1fcd6 100644
--- a/src/mtype.c
+++ b/src/mtype.c
@@ -4173,6 +4173,17 @@ Expression *TypeAArray::dotExp(Scope *sc, Expression *e,
Identifier *ident)
 else
 #endif
 {
+/* Create a new temporary variable for literal arrays.
+ */
+if (e-op == TOKassocarrayliteral)
+{
+Identifier *idtmp = Lexer::uniqueId(__aatmp);
+VarDeclaration *aatmp = new VarDeclaration(loc, e-type, idtmp,
new ExpInitializer(0, e));
+aatmp-storage_class |= STCctfe;
+Expression *ae = new DeclarationExp(loc, aatmp);
+e = new CommaExp(loc, ae, new VarExp(loc, aatmp));
+e = e-semantic(sc);
+}
 e-type = getImpl()-type;
 e = e-type-dotExp(sc, e, ident);
 //e = Type::dotExp(sc, e, ident);

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


[Issue 5675] e2ir assertion on AALiteral call expression

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


Iain Buclaw ibuc...@ubuntu.com changed:

   What|Removed |Added

 CC||ibuc...@ubuntu.com


--- Comment #2 from Iain Buclaw ibuc...@ubuntu.com 2011-04-23 12:40:36 PDT ---
Patch in issue 4460 fixes this.

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


[Issue 5876] New: std.container doesn't work with delegates

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

   Summary: std.container doesn't work with delegates
   Product: D
   Version: D2
  Platform: Other
OS/Version: All
Status: NEW
  Severity: regression
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: necrom...@gmail.com


--- Comment #0 from Max Klyga necrom...@gmail.com 2011-04-23 12:47:02 PDT ---
This commit made pointsTo not accept delegates as valid arguments, due to Issue
5875.

https://github.com/D-Programming-Language/phobos/commit/0339b6acdeb74ff28cfa2ec30ec5a192709e8695#std/exception.d

This change broke code that used std.container.SList or std.container.Array
with delegates as elements.

-
import std.container;

void main() {
SLIst!(void function()) foo; // works
SList!(void delegate()) bar; // used to work
}

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


[Issue 3779] [123][0][$-1] causes __dollar unresolved in compile-time.

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


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #4 from Walter Bright bugzi...@digitalmars.com 2011-04-23 
15:49:56 PDT ---
D1 Fix:
https://github.com/D-Programming-Language/dmd/commit/da0159d02d0e4ecb7ad1afa4bc6da402e677846f

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


[Issue 3792] Regression(1.053) non-constant expression for a template inside a struct using a struct initializer

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



--- Comment #8 from Walter Bright bugzi...@digitalmars.com 2011-04-23 
15:50:37 PDT ---
D1 fix:
https://github.com/D-Programming-Language/dmd/commit/da0159d02d0e4ecb7ad1afa4bc6da402e677846f

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


[Issue 5858] Import not acctept const string as arguments

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



--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2011-04-23 
15:51:12 PDT ---
https://github.com/D-Programming-Language/dmd/commit/da0159d02d0e4ecb7ad1afa4bc6da402e677846f

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