Thread overview | |||||
---|---|---|---|---|---|
|
September 26, 2006 [Issue 368] New: "immediate"-function types allowed as the return type of functions. | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=368 Summary: "immediate"-function types allowed as the return type of functions. Product: D Version: 0.167 Platform: PC OS/Version: Windows Status: NEW Keywords: accepts-invalid, ice-on-invalid-code Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: brunodomedeiros+bugz@gmail.com "immediate"-function types allowed as the return type of functions. Example: -------- void func(int a) { } //typedef int ft(int); typeof(func) test() { } ---- Instead, the compiler complains that a return is needed (yet such return value can not be specified). Using a typedef results in the same problem. The following extended testcase crashes the compiler: -------- void func(int a) { } typeof(func) test() { if(true) throw new Exception(""); } ---- -- |
October 05, 2006 [Issue 368] "immediate"-function types allowed as the return type of functions. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=368 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from bugzilla@digitalmars.com 2006-10-04 19:58 ------- Fixed DMD 0.168 -- |
October 06, 2006 Re: [Issue 368] New: "immediate"-function types allowed as the return type of functions. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail Attachments: | d-bugmail@puremagic.com schrieb am 2006-09-26: > http://d.puremagic.com/issues/show_bug.cgi?id=368 > "immediate"-function types allowed as the return type of functions. Example: > > -------- > void func(int a) { } > //typedef int ft(int); > > typeof(func) test() { > } > ---- > Instead, the compiler complains that a return is needed (yet such return value can not be specified). Using a typedef results in the same problem. > > The following extended testcase crashes the compiler: > > -------- > void func(int a) { } > > typeof(func) test() { > if(true) throw new Exception(""); > } > ---- Added to DStress as http://dstress.kuehne.cn/nocompile/t/typeof_12_A.d http://dstress.kuehne.cn/nocompile/t/typeof_12_B.d Thomas |
Copyright © 1999-2021 by the D Language Foundation