Skip to content

Commit 5ce69c5

Browse files
committed
feat: warn for BroadcastFunction
1 parent 0c8aab9 commit 5ce69c5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/OperatorEnumConstruction.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,15 @@ redefine operators for `AbstractExpressionNode` types, as well as `show`, `print
452452
end
453453
end
454454

455+
if any(
456+
op_set -> any(op -> op isa Broadcast.BroadcastFunction, op_set),
457+
(binary_operators, unary_operators),
458+
)
459+
# TODO: Fix issue with defining operators on a `BroadcastFunction`
460+
# and then on a regular function
461+
@warn "Using `BroadcastFunction` in an `OperatorEnum` is not yet stable"
462+
end
463+
455464
operators = OperatorEnum(Tuple(binary_operators), Tuple(unary_operators))
456465

457466
if define_helper_functions

0 commit comments

Comments
 (0)