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-02-23 02:37:11 -07:00
2023-11-22 13:24:27 -05:00
2023-11-22 19:08:55 -07:00
2024-02-25 19:12:08 -08:00
2023-10-23 22:42:18 -04:00
2024-02-12 05:25:07 +01:00
2024-02-05 11:55:14 +03:30
2024-03-01 17:42:54 -08:00
2023-10-25 04:28:30 -04:00
2024-02-09 14:02:57 -08:00
2024-01-24 12:48:12 +01:00
2023-11-03 23:18:21 -04:00
2024-02-28 04:30:49 +01:00
2024-02-01 15:22:36 +02:00
2024-02-08 15:39:28 +01:00
2024-02-26 21:35:33 -07:00
2024-02-25 11:22:10 +01:00
2024-02-26 20:11:43 -08:00
2023-10-21 21:24:55 +00:00