Jack Applegame:

A brony? :-)

But sometimes ref becomes a part of type. For example "void delegate(ref int)" and "void delegate(int)" are different types. Is it possible to cast from one to another safely? For example:

void foo(ref int);
void function(int) fp;
fp = cast(typeof(fp)) foo; /// is it safe???

In one case the function expects a pointer and in one case it expects a int value. The assembly code of the two functions is different and does different things.

Bye,
bearophile

Reply via email to