projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New tests.
[mono.git]
/
mcs
/
tests
/
gtest-anon-24.cs
diff --git
a/mcs/tests/gtest-anon-24.cs
b/mcs/tests/gtest-anon-24.cs
index 8c97345554f85b719cde1149a20e0b2572da7504..103ba8d0537fc87baa348a1b8927e296b203322f 100644
(file)
--- a/
mcs/tests/gtest-anon-24.cs
+++ b/
mcs/tests/gtest-anon-24.cs
@@
-14,6
+14,15
@@
interface IFoo<TOne,TTwo>
{
}
{
}
+class CA<T>
+{
+ public struct Nested
+ {
+ public static readonly T Value;
+ public readonly T Value2;
+ }
+}
+
class Test
{
static Func<T[]> For<T> (List<T> list)
class Test
{
static Func<T[]> For<T> (List<T> list)
@@
-153,6
+162,14
@@
class Test
};
}
};
}
+ static Func<T[]> NestedTypeMutate<T> ()
+ {
+ var local = new CA<T>.Nested ();
+ return () => {
+ return new [] { CA<T>.Nested.Value, local.Value2 };
+ };
+ }
+
public static int Main ()
{
if (For (new List<int> { 5, 10 })() [1] != 10)
public static int Main ()
{
if (For (new List<int> { 5, 10 })() [1] != 10)
@@
-201,6
+218,10
@@
class Test
var t11 = TypeOf ("b");
if (t11 () != typeof (string))
return 11;
var t11 = TypeOf ("b");
if (t11 () != typeof (string))
return 11;
+
+ var t12 = NestedTypeMutate<ulong> ()();
+ if (t12 [0] != 0 || t12 [1] != 0)
+ return 12;
Console.WriteLine ("OK");
return 0;
Console.WriteLine ("OK");
return 0;