[Issue 9563] (2.062) typeof(T[0]) no longer works with array T's
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 22 08:21:15 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9563
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |schveiguy at yahoo.com
Resolution| |INVALID
--- Comment #5 from Steven Schveighoffer <schveiguy at yahoo.com> 2013-02-22 08:21:07 PST ---
This is indeed a bug that was fixed.
T[0] is applying index to the type, not an instance of the type. I wouldn't
expect typeof(T[0]) to work at all, it's like saying typeof(int) (which doesn't
compile), typeof converts an expression into its type.
You should be able to do typeof(T.init[0]).
--
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