[Issue 15280] Unable to factor two simple functions into one inout function

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Nov 3 06:21:56 PST 2015


https://issues.dlang.org/show_bug.cgi?id=15280

--- Comment #2 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to Sobirari Muhomori from comment #1)
> One const method looks enough in your case:
> 
> 	List tail() const
> 	{
> 		assert(root);
> 		auto n = root.next;
> 		return List(n);
> 	}

Working around this case is not the point - there are many other cases that
don't work.

--


More information about the Digitalmars-d-bugs mailing list