[Bug 31] New: Keyword 'function' and pointer test broken for IsExpression

Thomas Kuehne thomas-dloop at kuehne.cn
Wed Mar 15 12:27:06 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sean Kelly schrieb am 2006-03-15:
> By the way, this code:
>
>      class C { void fn() {} }
>      static if( is( typeof(C.fn) == function ) )
>          pragma( msg, "is function\n" );
>      static if( is( typeof(C.fn) == delegate ) )
>          pragma( msg, "is delegate\n" );
>
>
> prints "is function" if compiled.  Aren't non-static class functions 
> actually delegates?

Added to DStress as
http://dstress.kuehne.cn/run/i/is_13_A.d
http://dstress.kuehne.cn/run/i/is_13_B.d
http://dstress.kuehne.cn/run/i/is_13_C.d
http://dstress.kuehne.cn/run/i/is_13_D.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFEGIIo3w+/yD4P9tIRApHHAKCMeCKhln+R8zdriLdDSpoIXCewgwCfcrrh
J90Jn3ukfw0vcbr6T894iR4=
=9GBQ
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list