[tuner] handle the case with multiple "preserve" attributes
[mono-project.git] / mcs / tests / gtest-150.cs
blob31cbe55a22a8b6ce11a48faec72bf2030114046a
1 using System;
2 static class Test1 {
3 public interface IOp<T> {
4 T Func(uint v);
6 public struct Op : IOp<ushort>, IOp<uint> {
7 ushort IOp<ushort>.Func(uint v) { return (ushort )(v * 2); }
8 uint IOp<uint>.Func(uint v) { return v * 4; }
10 static void Foo<T,OP>(uint v) where T:struct where OP : IOp<T> {
11 OP op = default(OP);
12 System.Console.WriteLine( op.Func(v) );
14 static public void Main() {
15 Foo<ushort, Op>(100);
16 Foo<uint, Op>(100);