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:
authorRaja R Harinath <harinath@hurrynot.org>2005-07-05 16:49:40 +0400
committerRaja R Harinath <harinath@hurrynot.org>2005-07-05 16:49:40 +0400
commit86b5eb07aa527626b15b02610a35c1da967081be (patch)
tree1d430e147430c3cba01bee8a65a5463ddb02883c /mcs/tests/test-423.cs
parentdc2160434ef8a0fae9f0b0b49bae8a6e0aa53b2c (diff)
In mcs:
Make 'fixed variable' handling standards compliant. Fix #70807, #72729. * ecore.cs (IVariable.VerifyFixed): Remove 'is_expression' parameter. (FieldExpr.VerifyFixed): Ensure that the field is part of a fixed variable of struct type. * expression.cs (Unary.ResolveOperator): Update to change. (Indirection.VerifyFixed): Likewise. (LocalVariableReference.VerifyFixed): A local variable is always fixed. (ParameterReference.VerifyFixed): Value parameters are fixed. (This.VerifyFixed): Treat 'this' as a value parameter. * statement.cs (LocalInfo.IsFixed): Remove. In tests: * test-423.cs: New test based on #70807. In errors: * cs0212-2.cs: New test from #72729. svn path=/trunk/mcs/; revision=46942
Diffstat (limited to 'mcs/tests/test-423.cs')
-rw-r--r--mcs/tests/test-423.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/mcs/tests/test-423.cs b/mcs/tests/test-423.cs
new file mode 100644
index 00000000000..f50fb72414e
--- /dev/null
+++ b/mcs/tests/test-423.cs
@@ -0,0 +1,19 @@
+// Compiler options: -unsafe
+
+unsafe class Test
+{
+ static void lowLevelCall (int *pv) { }
+
+ static void Func (out int i)
+ {
+ fixed(int *pi = &i)
+ lowLevelCall (pi);
+ }
+
+ static void Main ()
+ {
+ int i = 0;
+ Func (out i);
+ }
+}
+