|
|
От: |
VladD2
|
www.nemerle.org |
| Дата: | 23.11.08 19:32 | ||
| Оценка: |
|
||
__>using System.Console;
__>public class Test {
__> private static x1(i: int) : int { i; }
__> private static x2(i: string) : string { i; }
__> public static Main() : void {
__> mutable x = x1;
__> WriteLine("calling x1:");
__> WriteLine(x(100));
__> WriteLine("assign x2 to x:");
__> x = (x2 : object) :> int -> int;
__> WriteLine("assigned");
__> WriteLine("calling x2:");
__> WriteLine(x(100));
__> }
__>}
__>__>calling x1:
__>100
__>assign x2 to x:
__>assigned
__>calling x2:
__>Необработанное исключение: System.InvalidCastException: Не удалось привести тип
__>объекта "System.Int32" к типу "System.String".
__> в Test._N_static_proxy734.apply(Object _N_sp_parm735)
__> в Test.Main()