public static Term op_Implicit(double x);
public static Term op_Addition(Term, Term);
}
public class Decision : Term {
}
From Python, when we say something like this:
a = Decision
b = 2.0 + a
the compiler gives an error saying that it can’t add a “float” to a
“Decision”. It works if we say
a = Decision
b = Term.op_Implicit(2.0) + a
but this is pretty ugly.
Work Item Details
Original CodePlex Issue:Issue 24640Status: Active
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Sep 14, 2009 at 10:09 PM
Reported by: CurtHagenlocher
Updated on: Jun 26, 2013 at 6:31 AM
Updated by: jdhardy
Given classes that look like the following:
public abstract class Term {
}
public class Decision : Term {
}
From Python, when we say something like this:
a = Decision
b = 2.0 + a
the compiler gives an error saying that it can’t add a “float” to a “Decision”. It works if we say
a = Decision
b = Term.op_Implicit(2.0) + a
but this is pretty ugly.
Work Item Details
Original CodePlex Issue: Issue 24640 Status: Active Reason Closed: Unassigned Assigned to: Unassigned Reported on: Sep 14, 2009 at 10:09 PM Reported by: CurtHagenlocher Updated on: Jun 26, 2013 at 6:31 AM Updated by: jdhardy
Binary Attachments
testcase-24640.zip