Bug 315051 (MONO59864) - [PATCH] CS0019
Summary: [PATCH] CS0019
Status: RESOLVED FIXED
Alias: MONO59864
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2004-06-09 15:27 UTC by Marek Safar
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
proposed patch (575 bytes, patch)
2004-09-20 03:38 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:41:35 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".