[Issue 4968] inout is sticky to function return type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 4 06:07:08 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4968
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
--- Comment #1 from Steven Schveighoffer <schveiguy at 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: -------
More information about the Digitalmars-d-bugs
mailing list