[Issue 4968] inout is sticky to function return type

2011-08-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4968


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #4 from Kenji Hara k.hara...@gmail.com 2011-08-31 08:07:52 PDT ---
*** This issue has been marked as a duplicate of issue 3748 ***

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


[Issue 4968] inout is sticky to function return type

2011-05-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4968



--- Comment #2 from Kenji Hara k.hara...@gmail.com 2011-05-06 09:21:13 PDT ---
Created an attachment (id=964)
test patch

This patch only fix comment#1 case, but not support more cases (array,
function, delegate, etc.)

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


[Issue 4968] inout is sticky to function return type

2011-05-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4968


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

   What|Removed |Added

 Attachment #964 is|0   |1
   obsolete||


--- Comment #3 from Kenji Hara k.hara...@gmail.com 2011-05-06 22:14:25 PDT ---
Created an attachment (id=965)
Improvement

Posted pull request:
https://github.com/D-Programming-Language/dmd/pull/58

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


[Issue 4968] inout is sticky to function return type

2010-10-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4968


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

   What|Removed |Added

 CC||schvei...@yahoo.com


--- Comment #1 from Steven Schveighoffer schvei...@yahoo.com 2010-10-04 
06:06:46 PDT ---
This is a good catch.  Although inout doesn't work currently, so don't expect
much yet.

IMO, this is how the compiler should behave:

void foo(T)(T t)
{
  writeln(typeof(t).stringof);
}

inout(int)
f(inout(int) i)
{
   return i;
}

void main()
{
   int i;
   const int j;
   immutable int k;
   foo(f(i));
   foo(f(j));
   foo(f(k));
}

should print:

int
const(int)
immutable(int)

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