mlugg 2c4ac44f25
compiler: treat decl_val/decl_ref of potentially generic decls as captures
This fixes an issue with the implementation of #18816. Consider the
following code:

```zig
pub fn Wrap(comptime T: type) type {
    return struct {
        pub const T1 = T;
        inner: struct { x: T1 },
    };
}
```

Previously, the type of `inner` was not considered to be "capturing" any
value, as `T1` is a decl. However, since it is declared within a generic
function, this decl reference depends on the context, and thus should be
treated as a capture.

AstGen has been augmented to tunnel references to decls through closure
when the decl was declared in a potentially-generic context (i.e. within
a function).
2024-03-06 21:26:38 +00:00
..
2024-03-06 14:17:41 -05:00
2024-02-12 05:25:07 +01:00
2023-12-20 13:17:15 +02:00
2024-01-20 00:21:34 +00:00
2023-09-19 09:37:31 -07:00
2023-09-19 09:37:31 -07:00
2023-07-31 03:49:21 -04:00
2024-01-03 02:52:25 -05:00