Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=80313 --- shadow/80313 2006-12-19 08:31:22.000000000 -0500 +++ shadow/80313.tmp.4182 2006-12-19 08:31:22.000000000 -0500 @@ -0,0 +1,56 @@ +Bug#: 80313 +Product: Mono: Compilers +Version: 1.2 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Implicit casts not considered with compound assignments + +Description of Problem: + +Similar to bug80288: + +using System; + +namespace Bugs +{ + class Bug1 + { + struct MyInt + { + private int value; + public MyInt(int value) + { + this.value = value; + } + public static implicit operator MyInt(int value) + { + return new MyInt(value); + } + public static implicit operator int(MyInt b) + { + return b.value; + } + } + + public static void Main(string[] args) + { + MyInt i = 3; + i &= (4 + i); + Console.WriteLine(i); + } + } +} + +Assignment "i &= (4 + i)" fails although (i & (4 + i)) is implicitely +convertible to MyInt. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
