Skip to content

Commit

Permalink
Assert that the representation is TaskOutput, not just anything loc…
Browse files Browse the repository at this point in the history
…al (which could be a resolved cell)
  • Loading branch information
bgw committed Nov 15, 2024
1 parent d3206de commit 93893d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions turbopack/crates/turbo-tasks/src/vc/operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ impl<T: ?Sized> OperationVc<T> {
// TODO to avoid this runtime check, we should mark functions with `(operation)` and return
// a OperationVc directly
assert!(
!node.is_local(),
"OperationVc::new can't be used on local tasks"
matches!(node.node, RawVc::TaskOutput(..)),
"OperationVc::new must be called on the immediate return value of a task function"
);
Self { node }
}
Expand Down

0 comments on commit 93893d6

Please sign in to comment.