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=79082 --- shadow/79082 2006-08-15 18:27:23.000000000 -0400 +++ shadow/79082.tmp.4461 2006-08-15 18:27:23.000000000 -0400 @@ -0,0 +1,35 @@ +Bug#: 79082 +Product: Mono: Compilers +Version: 1.1 +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 conversion to decimal with unary minus + +While my previosly reported bug #79070 (Implicit conversion to decimal on +both operands) is fixed in 1.1.16.1, the following code still doesn't work +for me (it works with csc). The error message is "unary.cs(8,30): error +CS0023: Operator `-' cannot be applied to operand of type `MyDecimal'". +Again, mcs will compile successfully when using int instead of decimal. + + +class MyDecimal { + public static implicit operator decimal(MyDecimal d) { return 42; } +} + +class Unary { + public static void Main() { + MyDecimal d = new MyDecimal(); + System.Console.WriteLine(-d); + } +} _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
