[Issue 8516] New: std.string.representation works incorrect for shared(const(T)) types

2012-08-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8516

   Summary: std.string.representation works incorrect for
shared(const(T)) types
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: verylonglogin@gmail.com


--- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-08-07 
11:16:46 MSD ---
---
import std.string;
static assert(is(typeof(representation(cast(shared(const(char))[]) hello)) ==
shared(const(ubyte; // Fails
---

Also `representation` implementation is ugly and documentation tells that it
Returns the representation type that is incorrect because it returns a value
as it's a function.

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


[Issue 8516] std.string.representation works incorrect for shared(const(T)) types

2012-08-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8516



--- Comment #1 from Denis Shelomovskij verylonglogin@gmail.com 2012-08-07 
11:18:44 MSD ---
https://github.com/D-Programming-Language/phobos/pull/742

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


[Issue 8517] New: ICE: Internal error: toir.c 178

2012-08-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8517

   Summary: ICE: Internal error: toir.c 178
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: michal.min...@gmail.com


--- Comment #0 from Michal Minich michal.min...@gmail.com 2012-08-07 08:35:47 
PDT ---
dmd 2.060

void x1 () { y!(a = a)(); }
void x2 () { y!(a = a)(); }
void y (alias f) () { y!(a = a)(); }

Comment out either x1 or x2 line and error disappears.

This bug might be a duplicate of
http://d.puremagic.com/issues/show_bug.cgi?id=8460
http://d.puremagic.com/issues/show_bug.cgi?id=8436
http://d.puremagic.com/issues/show_bug.cgi?id=7917
http://d.puremagic.com/issues/show_bug.cgi?id=6426
and maybe others

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


[Issue 8518] New: Segmentation fault in _memset128ii

2012-08-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8518

   Summary: Segmentation fault in _memset128ii
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: jerro.pub...@gmail.com


--- Comment #0 from jerro.pub...@gmail.com 2012-08-07 12:42:53 PDT ---
The following program causes a segmentations fault when compiled with -O
-inline -release with DMD 2.060 on 64 bit Linux:


struct A
{
double a;
double b;
}

void main()
{
auto a = new A[2];
a[] = A.init;
}

The core dump:

Core was generated by `./f'.
Program terminated with signal 11, Segmentation fault.
#0  0x0041a4f1 in _memset128ii ()

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


[Issue 8519] New: winsamp.d doesn't compile with 2.060

2012-08-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8519

   Summary: winsamp.d doesn't compile with 2.060
   Product: D
   Version: unspecified
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: druntime
AssignedTo: nob...@puremagic.com
ReportedBy: r...@myopera.com


--- Comment #0 from r...@myopera.com 2012-08-07 16:17:08 PDT ---
cd dmd2\samples\d
dmd winsamp winsamp.def
winsamp.d(47): Error: cannot implicitly convert expression ( WindowProc) of
type extern (Windows) int function(void* hWnd, uint message, uint wParam, int
lParam) to extern (Windows) int function(void*, uint, uint, int) nothrow

It works with dmd2.059.

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


[Issue 8520] New: Simple in-constrained opBinaryRight in interface doesn't work

2012-08-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8520

   Summary: Simple in-constrained opBinaryRight in interface
doesn't work
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: major
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: a...@lycus.org


--- Comment #0 from Alex Rønne Petersen a...@lycus.org 2012-08-08 01:54:18 
CEST ---
┌─[alexrp@zor] - [~/Projects/tests] - [2012-08-08 01:52:24]
└─[$]  cat test.d
import std.stdio;

interface I
{
int* opBinaryRight(string op : in)(int i);
}

class C : I
{
int* opBinaryRight(string op : in)(int i)
{
return null;
}
}

void main()
{
I i = new C;
int* p = 42 in i;
writeln(p);
}
┌─[alexrp@zor] - [~/Projects/tests] - [2012-08-08 01:52:26]
└─[$]  dmd test.d
test.o:test.d:function _Dmain: error: undefined reference to
'_D4test1I30__T13opBinaryRightVAyaa2_696eZ13opBinaryRightMFiZPi'
collect2: ld returned 1 exit status
--- errorlevel 1

It's my understanding that this is supposed to work since the opBinaryRight
template is constrained specifically to in. This bug makes operators in
interfaces pretty unusable.

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


[Issue 8519] winsamp.d doesn't compile with 2.060

2012-08-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8519


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com
   Severity|normal  |regression


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-08-07 
17:41:34 PDT ---
Marking as regression.

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


[Issue 8520] Simple in-constrained opBinaryRight in interface doesn't work

2012-08-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8520


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

   What|Removed |Added

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


--- Comment #1 from Simen Kjaeraas simen.kja...@gmail.com 2012-08-07 18:26:30 
PDT ---
Your understanding is wrong - templates never go in the vtable.

The solution is to use NVI and forwarding:

interface I
{
int* opBinaryRight_in(int i);

int* opBinaryRight(string op : in)(int i)
{
return opBinaryRight_in(i);
}
}

class C : I
{
int* opBinaryRight_in(int i)
{
return null;
}
}

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


[Issue 1759] Closures and With Statements

2012-08-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1759


Salih Dincer sali...@hotmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||sali...@hotmail.com
 Resolution||INVALID


--- Comment #1 from Salih Dincer sali...@hotmail.com 2012-08-07 20:56:08 PDT 
---
This is not a bug it's a feature,
there's solution:

void main() {
  struct SS {
   int a, b, c;
  }
  int delegate () addss(SS obj){
return {
  with(obj) return a+b+c;
};
  }
  addss(SS(7, 10, 60))().writeln((total numbers 77));
}

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


[Issue 8414] with statement causes linker error

2012-08-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8414


Salih Dincer sali...@hotmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||sali...@hotmail.com
 Resolution||INVALID


--- Comment #1 from Salih Dincer sali...@hotmail.com 2012-08-07 21:45:19 PDT 
---
I think so not a bug,
it's work:

with (Enum) {
if(matchAny(en, en1, en2))
test-ok.writeln;
}

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


[Issue 8414] with statement causes linker error

2012-08-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8414


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

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |


--- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-08-07 
22:47:00 PDT ---
It's still a bug, if you use braces the bug isn't reproduced:

OK:
with (Enum)
{
if (matchAny(en, en1, en2)) 
{ 
}
}

Linker error:
with (Enum)
if (matchAny(en, en1, en2)) 
{ 
}

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