digitalmars.D.bugs - [Issue 368] New: "immediate"-function types allowed as the return type of functions.
- d-bugmail puremagic.com (31/31) Sep 26 2006 http://d.puremagic.com/issues/show_bug.cgi?id=368
- d-bugmail puremagic.com (9/9) Oct 04 2006 http://d.puremagic.com/issues/show_bug.cgi?id=368
- Thomas Kuehne (12/29) Oct 06 2006 -----BEGIN PGP SIGNED MESSAGE-----
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("");
}
----
--
Sep 26 2006
http://d.puremagic.com/issues/show_bug.cgi?id=368
bugzilla digitalmars.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Fixed DMD 0.168
--
Oct 04 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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 -----BEGIN PGP SIGNATURE----- iD8DBQFFJf/XLK5blCcjpWoRAqSbAJ9gzkKXk4I/n1rJ5ff7IVljm+2uyQCbB/d+ cdjrT9FpgLLGafR4lAKLEVM= =H3+j -----END PGP SIGNATURE-----
Oct 06 2006









d-bugmail puremagic.com 