Thread overview | |||||
---|---|---|---|---|---|
|
June 10, 2005 Compiler hangs on recursive template | ||||
---|---|---|---|---|
| ||||
DMD hangs when trying to compile the following: template AA(int i) { class A : AA!(i+1).A {} } alias AA!(0).A A0; If you add something that stops the recursion somehow, for example template AA(int i : 20) {class A {}} then it works as expected. I'm using 0.126 on linux. Nick |
June 11, 2005 Re: Compiler hangs on recursive template | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick | Weeelll, it eventually will fail with a stack fault. It just takes a long time. |
June 11, 2005 Re: Compiler hangs on recursive template | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick | -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nick schrieb am Fri, 10 Jun 2005 11:30:02 +0000 (UTC): > DMD hangs when trying to compile the following: > > template AA(int i) { > class A : AA!(i+1).A {} > } > alias AA!(0).A A0; > > If you add something that stops the recursion somehow, for example > > template AA(int i : 20) > {class A {}} > > then it works as expected. I'm using 0.126 on linux. Added to DStress as http://dstress.kuehne.cn/nocompile/t/template_16.d http://dstress.kuehne.cn/nocompile/t/template_class_09.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCqoNn3w+/yD4P9tIRAhr+AJ9rLyXxhMjgESLACEeEtY/C6jwoJwCfclV+ xZ65YRJ03oKc2IhClPz4wOA= =95Q3 -----END PGP SIGNATURE----- |
Copyright © 1999-2021 by the D Language Foundation