digitalmars.D.bugs - Mixin and variable
- ElfQT (42/42) Sep 03 2005
- =?ISO-8859-1?Q?Thomas_K=FChne?= (14/52) Sep 04 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Bastiaan Veelo (5/12) Sep 09 2005 What is the difference between A through D? Both A and B (but not C or
- Bastiaan Veelo (3/18) Sep 09 2005 Sorry, this should have been a reply to "AAs can't contain references to...
- Bastiaan Veelo (3/18) Sep 09 2005 Sorry, this should have been a reply to "AAs can't contain references to...
<output> Qnittest asm_rand Qnittest Error: 4invalid UTF-8 sequence </output> <code> private import std.stdio; int main(char[][] args) { printf("Main\n"); return 0; } unittest { mixin UnittestMixin; char[] m_file = "asm_rand" /*__FILE__*/; char[] m_testcase = "Uff"; Test1( m_file ); Test2(); } template UnittestMixin() { char[] m_file = "xxx"; void Test1(char[] c) { writefln("Qnittest %s", c); } void Test2() { Unittest.Test(m_file); } } class Unittest { static void Test(char[] c) { writefln("Qnittest %s", c); } } </code> <comment> If I use __FILE__ in a mixin, it will always contain the only one file name of the mixin declaration, not the place where it is included. </comment>
Sep 03 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ElfQT schrieb:<output> Qnittest asm_rand Qnittest Error: 4invalid UTF-8 sequence </output> <code> private import std.stdio; int main(char[][] args) { printf("Main\n"); return 0; } unittest { mixin UnittestMixin; char[] m_file = "asm_rand" /*__FILE__*/; char[] m_testcase = "Uff"; Test1( m_file ); Test2(); } template UnittestMixin() { char[] m_file = "xxx"; void Test1(char[] c) { writefln("Qnittest %s", c); } void Test2() { Unittest.Test(m_file); } } class Unittest { static void Test(char[] c) { writefln("Qnittest %s", c); } } </code>Added to DStress as http://dstress.kuehne.cn/run/m/mixin_14_A.d http://dstress.kuehne.cn/run/m/mixin_14_B.d http://dstress.kuehne.cn/run/m/mixin_14_C.d http://dstress.kuehne.cn/run/m/mixin_14_D.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDGtb13w+/yD4P9tIRAlLeAJkBtQtCBzoaB21GhzfEo4aRA07ozQCghiGG +P4hY/IrChjEOMXJJQhYJ+M= =mxla -----END PGP SIGNATURE-----
Sep 04 2005
Thomas Kühne wrote:Added to DStress as http://dstress.kuehne.cn/run/m/mixin_14_A.d http://dstress.kuehne.cn/run/m/mixin_14_B.d http://dstress.kuehne.cn/run/m/mixin_14_C.d http://dstress.kuehne.cn/run/m/mixin_14_D.dWhat is the difference between A through D? Both A and B (but not C or D) appear on the webpage. Thanks, Bastiaan.
Sep 09 2005
Bastiaan Veelo wrote:Thomas Kühne wrote:Sorry, this should have been a reply to "AAs can't contain references to interfaces"...Added to DStress as http://dstress.kuehne.cn/run/m/mixin_14_A.d http://dstress.kuehne.cn/run/m/mixin_14_B.d http://dstress.kuehne.cn/run/m/mixin_14_C.d http://dstress.kuehne.cn/run/m/mixin_14_D.dWhat is the difference between A through D? Both A and B (but not C or D) appear on the webpage. Thanks, Bastiaan.
Sep 09 2005
Bastiaan Veelo wrote:Thomas Kühne wrote:Sorry, this should have been a reply to "AAs can't contain references to interfaces"...Added to DStress as http://dstress.kuehne.cn/run/m/mixin_14_A.d http://dstress.kuehne.cn/run/m/mixin_14_B.d http://dstress.kuehne.cn/run/m/mixin_14_C.d http://dstress.kuehne.cn/run/m/mixin_14_D.dWhat is the difference between A through D? Both A and B (but not C or D) appear on the webpage. Thanks, Bastiaan.
Sep 09 2005