diff options
author | Marek Safar <marek.safar@gmail.com> | 2017-05-22 17:58:26 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-05-22 18:01:12 +0300 |
commit | 3f527c012dd06bb0b87de8b7eaaf06b66596cb45 (patch) | |
tree | 2ad323920c00315a2a4554115e3ec05522ca322b /mcs/tests/gtest-646.cs | |
parent | 027da05f20fd15ea978b1c294e7ec20bfb772dd7 (diff) |
[mcs] Inflate referenced current types for imported type definitions. Fixes #56462
Diffstat (limited to 'mcs/tests/gtest-646.cs')
-rw-r--r-- | mcs/tests/gtest-646.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mcs/tests/gtest-646.cs b/mcs/tests/gtest-646.cs new file mode 100644 index 00000000000..bc3d6a8ee9b --- /dev/null +++ b/mcs/tests/gtest-646.cs @@ -0,0 +1,31 @@ +// Compiler options: -r:gtest-646-lib.dll + +public class LocalBug<T> +{ + public int Foo (LocalBug<T> p1, LocalBug<T> p2) + { + return 1; + } + + public int Foo (LocalBug<object> p1, LocalBug<T> p2) + { + return 2; + } +} + +class X +{ + public static int Main () + { + var o = new CompilerBug<object> (); + if (o.Foo (o, o) != 2) + return 1; + + var o2 = new LocalBug<object> (); + if (o2.Foo (o2, o2) != 2) + return 2; + + return 0; + } +} + |