zig/test/behavior
Andrew Kelley a3104a4a78 stage2: fix comptime stores and sentinel-terminated arrays
* ZIR: the `array_type_sentinel` now has a source node attached to it
   for proper error reporting.
 * Refactor: move `Module.arrayType` to `Type.array`
 * Value: the `bytes` and `array` tags now include the sentinel, if the
   type has one. This simplifies comptime evaluation logic.
 * Sema: fix `zirStructInitEmpty` to properly handle when the type is
   void or a sentinel-terminated array. This handles the syntax `void{}`
   and `[0:X]T{}`.
 * Sema: fix the logic for reporting "cannot store runtime value in
   compile time variable" as well as for emitting a runtime store when a
   pointer value is comptime known but it is a global variable.
 * Sema: implement elemVal for double pointer to array. This can happen
   with this code for example: `var a: *[1]u8 = undefined; _ = a[0];`
 * Sema: Rework the `storePtrVal` function to properly handle nested
   structs and arrays.
   - Also it now handles comptime stores through a bitcasted pointer.
     When the pointer element type and the type according to the Decl
     don't match, the element value is bitcasted before storage.
2021-10-12 21:38:46 -07:00
..
2021-06-21 17:03:03 -07:00
2021-10-04 23:30:04 -07:00
2021-08-01 12:36:04 -07:00
2021-08-30 18:50:07 -04:00
2021-10-05 23:05:14 -07:00
2021-10-05 21:38:47 -07:00
2021-10-07 17:11:27 -07:00
2021-06-21 17:03:03 -07:00
2021-09-28 22:38:51 -07:00
2021-07-26 20:41:00 -04:00
2021-10-05 16:56:46 -07:00
2021-06-21 17:03:03 -07:00
2021-08-07 15:46:53 -07:00
2021-07-26 20:05:48 -04:00
2021-10-05 23:05:14 -07:00