File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -1079,9 +1079,10 @@ function __dot__(x::Expr)
10791079 Expr (x. head, x. args[1 ], dotargs[2 ])
10801080 else
10811081 if x. head == :&& || x. head == :||
1082- Base. depwarn ("""
1083- using $(x. head) expressions in @. is deprecated; in the future it will
1084- become elementwise. Break the expression into smaller parts instead.""" , nothing )
1082+ error ("""
1083+ Using `&&` and `||` is disallowed in `@.` expressions.
1084+ Use `&` or `|` for elementwise logical operations.
1085+ """ )
10851086 end
10861087 head = string (x. head)
10871088 if last (head) == ' =' && first (head) != ' .'
Original file line number Diff line number Diff line change @@ -1256,6 +1256,7 @@ function get_testset_depth()
12561256end
12571257
12581258_args_and_call (args... ; kwargs... ) = (args[1 : end - 1 ], kwargs, args[end ](args[1 : end - 1 ]. .. ; kwargs... ))
1259+ _materialize_broadcasted (f, args... ) = Broadcast. materialize (Broadcast. broadcasted (f, args... ))
12591260"""
12601261 @inferred f(x)
12611262
@@ -1294,7 +1295,12 @@ macro inferred(ex)
12941295 ex = Expr (:call , :getindex , ex. args... )
12951296 end
12961297 Meta. isexpr (ex, :call )|| error (" @inferred requires a call expression" )
1297-
1298+ farg = ex. args[1 ]
1299+ if isa (farg, Symbol) && first (string (farg)) == ' .'
1300+ farg = Symbol (string (farg)[2 : end ])
1301+ ex = Expr (:call , GlobalRef (Test, :_materialize_broadcasted ),
1302+ farg, ex. args[2 : end ]. .. )
1303+ end
12981304 Base. remove_linenums! (quote
12991305 let
13001306 $ (if any (a-> (Meta. isexpr (a, :kw ) || Meta. isexpr (a, :parameters )), ex. args)
You can’t perform that action at this time.
0 commit comments