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-06-02 15:05:41 +0400
committerRaja R Harinath <harinath@hurrynot.org>2005-06-02 15:05:41 +0400
commitb61fc1bb14ec9985b439c0584609b8eca31cb485 (patch)
treefbf7b335dd21eaec19427749415baa79a7163e80 /mcs/errors/cs0119-2.cs
parent3209af0eaf7c3d667b7789a0d791c4aff1c60c81 (diff)
Fix #75080, cs0119.cs.
* mcs/ecore.cs (Expression.ExprClassToResolveFlags): New. Broken out of ... (Expression.Resolve): ... this. Use it. Remove bogus code allowing ExprClass.Type and ExprClass.Namespace for ResolveFlags.VariableOrValue. (Expression.Resolve) [1-argument variant]: Change default resolve flags based on language version. (Expression.Error_UnexpectedKind): Use a simple string array rather than an ArrayList. * mcs/expression.cs (TypeOf.DoResolve): Set eclass to ExprClass.Value, not ExprClass.Type. (TypeOfVoid.DoResolve): Likewise. (MemberAccess.DoResolve) [3-argument variant]: Make private. Drop flags argument -- it always has the same value. * errors/cs0119-2.cs: New test from #75080. svn path=/trunk/mcs/; revision=45321
Diffstat (limited to 'mcs/errors/cs0119-2.cs')
-rw-r--r--mcs/errors/cs0119-2.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/mcs/errors/cs0119-2.cs b/mcs/errors/cs0119-2.cs
new file mode 100644
index 00000000000..340d78afbc0
--- /dev/null
+++ b/mcs/errors/cs0119-2.cs
@@ -0,0 +1,14 @@
+// cs0119: Expression denotes a 'method group', where a 'variable', 'value' or 'type' was expected
+// Line: 9
+
+public class App {
+
+ public static void Main() {}
+
+ SomeEnum SomeEnum() {
+ return SomeEnum.First;
+ }
+
+}
+
+enum SomeEnum { First, Second };