[Issue 611] New: IsExpression fails when inside implemented interface

Thomas Kuehne thomas-dloop at kuehne.cn
Wed Nov 29 13:32:06 PST 2006


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

d-bugmail at puremagic.com schrieb am 2006-11-27:
> http://d.puremagic.com/issues/show_bug.cgi?id=611

> interface Interface(T) {
>     static assert(is(T : Interface));
> }
>
> class Implementor : Interface!(Implementor) {}
>
> -----
> The above code generates the following error when compiling:
>
> err.d(2): static assert  (is(Implementor : Interface)) is false
>
> The assertion is self-evidently true; Implementor subtypes
> Interface!(Implementor), so is(Implementor : Interface!(Implementor)) should be
> true. This error occurs only when the assertion is contained within the
> interface itself; if it is placed within the Implementor class definition or
> outside, it compiles.

Added to DStress as
http://dstress.kuehne.cn/compile/i/is_15_A.d
http://dstress.kuehne.cn/compile/i/is_15_B.d
http://dstress.kuehne.cn/compile/i/is_15_C.d
http://dstress.kuehne.cn/compile/i/is_15_D.d
http://dstress.kuehne.cn/compile/i/is_15_E.d
http://dstress.kuehne.cn/compile/i/is_15_F.d
http://dstress.kuehne.cn/compile/i/is_15_G.d
http://dstress.kuehne.cn/compile/i/is_15_H.d
http://dstress.kuehne.cn/compile/i/is_15_I.d
http://dstress.kuehne.cn/compile/i/is_15_J.d
http://dstress.kuehne.cn/compile/i/is_15_K.d

Thomas


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

iD8DBQFFbgaQLK5blCcjpWoRAnjwAJ9l2MR9pFoQe4bvErBlqzUDUjZFjwCfRaAm
JyGq5tKEq59eSOKPe/4T15E=
=8DPF
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list