about summary refs log tree commit diff
path: root/tvix/eval/src
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src')
-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 4283b21276d4..31ab76aee815 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;
                 }