June 15, 2010 [Issue 4320] New: typeof(polymorphic lambda with template alias) is "void" | ||||
---|---|---|---|---|
| ||||
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 --- Comment #0 from Haruki Shigemori <rayerd.wiz@gmail.com> 2010-06-15 06:38:29 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: ------- |
June 16, 2010 [Issue 4320] typeof(polymorphic lambda with template alias) is "void" | ||||
---|---|---|---|---|
| ||||
Posted in reply to Haruki Shigemori | 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 --- Comment #1 from Haruki Shigemori <rayerd.wiz@gmail.com> 2010-06-16 10:15:43 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: ------- |
Copyright © 1999-2021 by the D Language Foundation