Bugzilla – Bug 315051
[PATCH] CS0019
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by marek.safar@seznam.cz 2004-06-09 08:27:13 MST ---- using System.Reflection; using System.Runtime.CompilerServices; public class Foo { public static void Main () { MethodImplAttributes methodImplAttributes = 0; if ((methodImplAttributes & MethodImplOptions.Synchronized) == 0) { } } } Actual Results: Compilation succeeded Expected Results: This code should report CS0019 cs0019-8.cs(13,22): error CS0019: Operator '&' cannot be applied to operands of type 'System.Reflection.MethodImplAttributes' and 'System.Runtime.CompilerServices.MethodImplOptions' ---- Additional Comments From jluke@cfl.rr.com 2004-09-19 20:38:30 MST ---- Created an attachment (id=166229) proposed patch ---- Additional Comments From jluke@cfl.rr.com 2004-09-19 20:40:13 MST ---- Attached patch just adds a test to check that the types are the same, just like the block immediately above it does. ---- Additional Comments From duncan@ximian.com 2005-02-13 03:52:31 MST ---- This looks good, let's commit it? ---- Additional Comments From miguel@ximian.com 2005-04-16 17:14:57 MST ---- Thanks for the patch; Applied. Imported an attachment (id=166229) Unknown operating system unknown. Setting to default OS "Other".