www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Internal error ? struct_prop : struct_prop

reply Vathix <vathix dprogramming.com> writes:
struct V
{
    int x;
}
class Foo
{
    static V prop() { V val; return val; }
    static void prop(V val) { }
}
int main()
{
    (new Foo).prop = true ? Foo.prop : Foo.prop; // here
    return 0;
}


DMD 0.109 output:
Internal error: e2ir.c 141


It seems to only happen when using properties that return structs.
Dec 29 2004
parent "Thomas Kuehne" <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Added to DStress as
http://dstress.kuehne.cn/run/bug_e2ir_141_A.d
http://dstress.kuehne.cn/run/bug_e2ir_141_B.d
http://dstress.kuehne.cn/run/bug_e2ir_141_C.d
http://dstress.kuehne.cn/run/bug_e2ir_141_D.d

Fails for structs and unions.

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

iD4DBQFB0z5h3w+/yD4P9tIRAjpZAJjfpNRG9NqvNGtWiH5oJpffC3fyAJ0eh9qT
GloOC3hMGIBzejVyqPgsRA==
=44XD
-----END PGP SIGNATURE-----
Dec 29 2004