digitalmars.D.bugs - [Issue 4320] New: typeof(polymorphic lambda with template alias) is "void"
- d-bugmail puremagic.com (29/29) Jun 15 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4320
- d-bugmail puremagic.com (15/15) Jun 16 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4320
http://d.puremagic.com/issues/show_bug.cgi?id=4320
Summary: typeof(polymorphic lambda with template alias) is
"void"
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: rayerd.wiz gmail.com
PDT ---
import std.stdio;
void func(alias fn)()
{
writeln(typeid(typeof(fn)));// void, NG!!!
}
void main()
{
int delegate(int) g;
writeln(typeid(typeof(g)));// int delegate(), OK!
writeln(typeid(typeof((int){return 1;})));// int delegate(), OK!
func!((i){return 1;})();
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 15 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4320
Haruki Shigemori <rayerd.wiz gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
PDT ---
Sorry!
I want to back down on this issue.
"(i){return 1;}" is a function template (not delegate literal).
typeof(function template) has not a type (However I do not think this is a type
void. uhmm...).
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 16 2010








d-bugmail puremagic.com