@@ -4,7 +4,7 @@ const diadic = [+, -, max, min, *, /, \, hypot, atan, mod, rem, ^]
44
55const previously_declared_for = []
66# TODO : keep domains tighter than this
7- function eval_number_methods (T, rhs1, rhs2)
7+ function number_methods (T, rhs1, rhs2)
88 exprs = []
99 for f in diadic
1010 for S in previously_declared_for
@@ -15,6 +15,7 @@ function eval_number_methods(T, rhs1, rhs2)
1515 end
1616
1717 expr = quote
18+ (f:: $ (typeof (f)))(a:: $T , b:: $T ) = $ rhs2
1819 (f:: $ (typeof (f)))(a:: $T , b:: Real ) = $ rhs2
1920 (f:: $ (typeof (f)))(a:: Real , b:: $T ) = $ rhs2
2021 (f:: $ (typeof (f)))(a:: $T , b:: Number ) = $ rhs2
@@ -32,12 +33,12 @@ function eval_number_methods(T, rhs1, rhs2)
3233end
3334
3435
35- macro eval_number_methods (T, rhs1, rhs2)
36- eval_number_methods (T, rhs1, rhs2)
36+ macro number_methods (T, rhs1, rhs2)
37+ number_methods (T, rhs1, rhs2)
3738end
3839
39- @eval_number_methods (Sym, term (f, a), term (f, a, b))
40- @eval_number_methods (Term, term (f, a), term (f, a, b))
40+ @number_methods (Sym, term (f, a), term (f, a, b))
41+ @number_methods (Term, term (f, a), term (f, a, b))
4142
4243for f in diadic
4344 @eval promote_symtype (:: $ (typeof (f)),
0 commit comments