[nem-en] Re: devel-en Digest, Vol 24, Issue 1
Kamil Skalski
kamil.skalski at gmail.com
Sun Dec 4 22:31:44 CET 2005
2005/12/4, Philippe Quesnel <philippe.quesnel at gmail.com>:
> hmm, a question comes to mind here ...
> Is my understanding correct that in this case the compiler understands it
> as
> trying to assign a function to a var ?
> (ie a 'closure', a Delegate, function ptr etc.) ???
>
Exactly. x.ToString is a function of type void -> string and compiler
is trying to assign such a value to a variable of type string. The
correct message should be
expected object of type string, while got object of type void->string
And also some hint should be printed in this case:
probably you forgot () after the function name...
--
Kamil Skalski
http://nazgul.omega.pl
More information about the devel-en
mailing list