summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0165-27.cs
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/errors/cs0165-27.cs')
-rw-r--r--mcs/errors/cs0165-27.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/mcs/errors/cs0165-27.cs b/mcs/errors/cs0165-27.cs
new file mode 100644
index 0000000000..db34dd83f6
--- /dev/null
+++ b/mcs/errors/cs0165-27.cs
@@ -0,0 +1,15 @@
+// CS0165: Use of unassigned local variable `a'
+// Line: 13
+
+using System;
+
+class Program
+{
+ public static void Main (string[] args)
+ {
+ int a, b;
+ string s = "";
+ var res = s != null ? a = 1 : b = 2;
+ Console.WriteLine (a);
+ }
+}