language: C# (mono-2.8)
date: 312 days 16 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
        using System;
        class Program
        {
                public static void Write(short v) { }
                static void Main(string[] args)
                {
                        Write(1);//ok
                        Write((int)1);//ok
                        int i=1;
                        Write(i);//error!?
                }
        }
 
prog.cs(10,25): error CS1502: The best overloaded method match for `Program.Write(short)' has some invalid arguments
prog.cs(4,36): (Location of the symbol related to previous error)
prog.cs(10,25): error CS1503: Argument `#1' cannot convert `int' expression to type `short'
Compilation failed: 2 error(s), 0 warnings