[Issue 5891] hasLength!iota is false
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 26 08:15:09 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5891
kennytm at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kennytm at gmail.com
--- Comment #1 from kennytm at gmail.com 2011-04-26 08:11:27 PDT ---
(SVN? You mean git?)
The problem is length() is an auto-return function, and somehow typeof() cannot
find the return type from this function:
--------------------------------------------------
import std.range;
struct X { @property auto length() { return 0; } }
pragma(msg, typeof(X.init.length)); // ()
--------------------------------------------------
Because of this, is(typeof(X.init.length) : ulong) cannot be true, and return
hasLength returns false.
This is more a DMD problem than a Phobos problem.
--
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