brewery
notashelf /
2539ff7ca3c73315b753b673c4e7cea265163465

nixir

public

Import-resolving Nix IR plugin

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/nixir.git
tests/inherit.nixNix17 lines252 B
1
# Test inherit keyword
2
let
3
  x = 10;
4
  y = 20;
5
  attrs = { a = 1; b = 2; c = 3; };
6
in
7
  {
8
    # Basic inherit from outer scope
9
    inherit x y;
10
11
    # Inherit from expression
12
    inherit (attrs) a b;
13
14
    # Mixed
15
    z = 30;
16
    inherit (attrs) c;
17
  }