Nicholas Bishop
e6b1679552
Add support for field initializers ( #7238 )
...
In handle_let_and_var.cpp, field initializers are now handled like
regular `var` initializers, by calling `LocalPatternMatch`.
In pattern_match.cpp, `FieldDecl`s with initializers are handled by
storing a value in `SemIR::File::field_initializers()`. This is a new
map where the keys are `FieldDecl` `InstId`s and the map values are
`InstId`s representing the initializer value.
In convert.cpp, `ConvertStructToStructOrClass` now has a `get_default`
function parameter that callers can use to provide a field default.
`ConvertStructToClass` uses this to provide a default from field
initializers.
2026-05-22 02:48:07 +00:00
..
2026-05-21 00:02:29 +00:00
2026-04-23 20:11:04 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-03-19 23:46:06 +00:00
2026-03-19 23:46:06 +00:00
2025-11-14 00:40:26 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2025-07-02 19:21:01 +00:00
2026-05-12 19:03:55 +00:00
2026-04-24 17:33:23 +00:00
2026-04-24 17:33:23 +00:00
2026-01-14 00:54:37 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-01-30 22:24:18 +00:00
2026-01-30 22:24:18 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-04-23 20:11:04 +00:00
2026-04-23 20:11:04 +00:00
2026-05-13 17:40:45 +00:00
2026-05-11 18:22:31 +00:00
2026-04-16 23:14:31 +00:00
2026-05-01 22:45:22 +00:00
2026-02-18 22:17:15 +00:00
2025-04-25 16:06:10 +00:00
2026-05-07 00:13:52 +00:00
2026-02-04 02:27:12 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-22 02:48:07 +00:00
2026-02-25 23:18:09 +00:00
2026-02-25 23:18:09 +00:00
2026-05-21 00:02:29 +00:00
2026-05-07 19:42:23 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-07 19:42:23 +00:00
2025-07-10 21:21:19 +00:00
2026-05-07 19:42:23 +00:00
2026-05-13 01:44:07 +00:00
2026-05-14 19:34:23 +00:00
2026-05-14 08:29:17 +00:00
2025-10-30 18:03:34 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-04-29 18:13:42 +00:00
2026-05-21 00:02:29 +00:00
2026-05-19 23:16:51 +00:00
2026-03-24 20:56:44 +00:00
2026-04-29 18:13:42 +00:00
2026-04-29 18:13:42 +00:00
2026-04-27 19:04:59 +00:00
2026-02-27 13:50:56 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-19 23:16:51 +00:00
2026-05-19 23:16:51 +00:00
2026-02-19 16:24:07 +00:00
2026-05-14 08:29:17 +00:00
2026-05-21 00:02:29 +00:00
2025-12-16 01:33:53 +00:00
2026-01-14 19:35:34 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-04-29 18:13:42 +00:00
2025-11-13 17:04:58 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-01-07 00:54:18 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2025-11-13 23:00:20 +00:00
2026-04-27 19:04:59 +00:00
2025-12-02 17:21:53 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-07 21:58:29 +00:00
2026-04-16 22:37:48 +00:00
2026-04-16 22:37:48 +00:00
2026-05-15 14:53:51 +00:00
2026-05-11 14:17:18 +00:00
2026-04-22 16:42:27 +00:00
2026-04-21 16:11:19 +00:00
2025-04-25 16:06:10 +00:00
2026-05-21 00:02:29 +00:00
2026-05-14 08:29:17 +00:00
2026-05-14 08:29:17 +00:00
2026-05-13 01:44:07 +00:00