bring Mono Security to monotouch
[mcs.git] / tests / test-212.cs
blob95bf0d0ea5b22bd8945e2ba8e1b8e26e51425b5e
1 //
2 // A compilation test - params with implicit user conversion
3 //
5 class Problem {
6 string somedata;
8 public Problem(string somedata) {
9 this.somedata = somedata;
11 public static implicit operator Problem(int x) {
12 return new Problem("" + x);
15 public static int Multi(int first, params Problem[] rest) {
16 return rest.Length;
19 public static int Main(string[] args) {
20 Problem[] ps = new Problem[] { 1, 2, 3 }; // ok
21 Multi (1, 2, 3, 4); // fails to compile
23 return 0;