projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not remap framework assembly if it's version is higher than the runtime version
[mono.git]
/
mcs
/
tests
/
dtest-025.cs
diff --git
a/mcs/tests/dtest-025.cs
b/mcs/tests/dtest-025.cs
index 6e5912af641377fbd175da725d39d67b7a0cbc62..c741ea76da6853b878f0277f03d8c76e5ced366f 100644
(file)
--- a/
mcs/tests/dtest-025.cs
+++ b/
mcs/tests/dtest-025.cs
@@
-1,13
+1,45
@@
+interface I
+{
+ void SetValue (int arg);
+}
+
+public struct S : I
+{
+ public int Value;
+
+ public void SetValue (int v)
+ {
+ Value = v;
+ }
+}
+
class C
{
class C
{
+ static void Method<T> (ref T t) where T : struct, I
+ {
+ dynamic d = 25;
+ t.SetValue (d);
+ }
+
public static int Main ()
{
int? x = null;
dynamic y = 50;
public static int Main ()
{
int? x = null;
dynamic y = 50;
- int v =
x.GetValueOrDefault(y);
+ int v = x.GetValueOrDefault(y);
if (v != 50)
return 1;
if (v != 50)
return 1;
+ var s = new S ();
+ dynamic d = 5;
+
+ s.SetValue (d);
+ if (s.Value != 5)
+ return 2;
+
+ Method (ref s);
+ if (s.Value != 25)
+ return 3;
+
return 0;
}
}
return 0;
}
}