mirror of
https://github.com/typst/typst
synced 2025-07-01 17:52:52 +08:00
fix local sink on call
warnings now get tracepoints
This commit is contained in:
parent
3823f560c5
commit
26ae1d3c27
@ -171,16 +171,16 @@ impl Eval for ast::FuncCall<'_> {
|
||||
// part of the call stack that led to the warning being raised,
|
||||
// thus allowing suppression of the warning through this call.
|
||||
let mut local_sink = Sink::new();
|
||||
let previous_sink =
|
||||
std::mem::replace(&mut vm.engine.sink, local_sink.track_mut());
|
||||
let mut engine = Engine {
|
||||
sink: local_sink.track_mut(),
|
||||
route: vm.engine.route.clone(),
|
||||
..vm.engine
|
||||
};
|
||||
|
||||
let call_result = func.call(&mut vm.engine, vm.context, args).trace(
|
||||
vm.world(),
|
||||
point,
|
||||
span,
|
||||
);
|
||||
let call_result =
|
||||
func.call(&mut engine, vm.context, args)
|
||||
.trace(vm.world(), point, span);
|
||||
|
||||
std::mem::replace(&mut vm.engine.sink, previous_sink);
|
||||
local_sink.trace_warnings(vm.world(), point, span);
|
||||
|
||||
// Push the accumulated warnings and other fields back to the
|
||||
|
Loading…
x
Reference in New Issue
Block a user