Thread overview | ||||||
---|---|---|---|---|---|---|
|
October 26, 2005 delegate type error | ||||
---|---|---|---|---|
| ||||
The following emits the wrong type information: int main() { int test(char[] s) {} auto del = &test; writelfn(typeof(typeid(del)).toString()); return 0; } This writes int delegate() instead of int delegate(char[]) |
October 26, 2005 Re: delegate type error | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C | "John C" <johnch_atms@hotmail.com> wrote in message news:djni43$1a52$1@digitaldaemon.com... > The following emits the wrong type information: > > int main() { > > int test(char[] s) {} > > auto del = &test; > writelfn(typeof(typeid(del)).toString()); Of course, I meant to say writefln(typeid(typeof(del)).toString()); > > return 0; > } > > This writes > int delegate() > instead of > int delegate(char[]) > |
October 28, 2005 Re: delegate type error | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C Attachments: | John C schrieb am 2005-10-26:
> The following emits the wrong type information:
>
> int main() {
>
> int test(char[] s) {}
>
> auto del = &test;
> writelfn(typeof(typeid(del)).toString());
>
> return 0;
> }
>
> This writes
> int delegate()
> instead of
> int delegate(char[])
>
This isn't "auto" related, but a general problem with
the TypeInfo of delegates.
Thomas
|
October 30, 2005 Re: delegate type error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kuehne | "Thomas Kuehne" <thomas-dloop@kuehne.cn> wrote in message news:b3m933-iu6.ln1@eiche.kuehne.cn... > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > John C schrieb am 2005-10-26: >> The following emits the wrong type information: >> >> int main() { >> >> int test(char[] s) {} >> >> auto del = &test; >> writelfn(typeof(typeid(del)).toString()); >> >> return 0; >> } >> >> This writes >> int delegate() >> instead of >> int delegate(char[]) >> > > This isn't "auto" related, but a general problem with > the TypeInfo of delegates. I realise that. Hence the title of the post. > > Thomas > > -----BEGIN PGP SIGNATURE----- > > iD8DBQFDYilL3w+/yD4P9tIRAsyMAKCdevq7++mnANgbu8o5h2KZoh0tMQCfVXCl > mL9FVO3UFRLkCVLF80Egu9I= > =vMT8 > -----END PGP SIGNATURE----- |
Copyright © 1999-2021 by the D Language Foundation