about summary refs log tree commit diff
path: root/tvix/eval/src/compiler/bindings.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/compiler/bindings.rs')
-rw-r--r--tvix/eval/src/compiler/bindings.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/compiler/bindings.rs b/tvix/eval/src/compiler/bindings.rs
index 4283b21276..31ab76aee8 100644
--- a/tvix/eval/src/compiler/bindings.rs
+++ b/tvix/eval/src/compiler/bindings.rs
@@ -323,8 +323,8 @@ impl Compiler<'_> {
         for inherit in node.inherits() {
             match inherit.from() {
                 // Within a `let` binding, inheriting from the outer scope is a
-                // no-op *if* the scope is fully static.
-                None if !kind.is_attrs() && !self.scope().has_with() => {
+                // no-op *if* there are no dynamic bindings.
+                None if !kind.is_attrs() && !self.has_dynamic_ancestor() => {
                     self.emit_warning(&inherit, WarningKind::UselessInherit);
                     continue;
                 }