Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2017-01-11 22:16:52 +0300
committerMarek Safar <marek.safar@gmail.com>2017-01-11 22:18:13 +0300
commit30f6c9933a6c0595a5d1d5cf681be39b4367446e (patch)
tree4b3da65da6e1d900e1f64a0a03e8c9f169ff6f6d /mcs/tests/gtest-642.cs
parentcd9f3030cd3f89e6cbdb0822d0d0f6b37ede84b1 (diff)
[mcs] Don't do constraints on fabricated generic methods. Fixes #47672
Diffstat (limited to 'mcs/tests/gtest-642.cs')
-rw-r--r--mcs/tests/gtest-642.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/mcs/tests/gtest-642.cs b/mcs/tests/gtest-642.cs
new file mode 100644
index 00000000000..d41cda7aa01
--- /dev/null
+++ b/mcs/tests/gtest-642.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+
+class Program
+{
+ static void Main ()
+ {
+ }
+
+ public static void Transform<V> (Area<V> area, Func<V, V> transform)
+ where V : IA<V>
+ {
+ Test (GetIB<V> (), t => Transform2 (null, transform));
+ }
+
+ static IB<W> GetIB<W> ()
+ where W : IA<W>
+ {
+ return null;
+ }
+
+ static void Test<T> (T values, Func<T, T> func)
+ {
+ }
+
+ public static IB<U> Transform2<U> (
+ IB<U> b,
+ Func<U, U> transform) where U : IA<U>
+ {
+ return null;
+ }
+}
+
+
+public class Area<TVector>
+ where TVector : IA<TVector>
+{
+ public IB<TVector> GetSegments ()
+ {
+ return null;
+ }
+}
+
+public interface IB<TB>
+ where TB : IA<TB>
+{
+}
+
+public interface IA<T>
+{
+}