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-04-08 20:09:03 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-19 18:01:54 +00:00
2026-05-21 00:02:29 +00:00
2026-05-19 18:01:54 +00:00
2026-05-19 18:01:54 +00:00
2026-05-21 00:02:29 +00:00
2026-02-19 23:33:36 +00:00
2026-02-19 23:33:36 +00:00
2026-05-21 00:02:29 +00:00
2026-05-19 18:01:54 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-13 16:11:20 +00:00
2026-02-27 13:50:56 +00:00
2026-03-23 20:38:20 +00:00
2026-05-21 00:02:29 +00:00
2026-05-19 18:01:54 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-04-29 18:13:42 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-12 22:15:09 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-19 18:01:54 +00:00
2026-05-21 00:02:29 +00:00
2026-05-07 13:44:40 +00:00
2025-06-18 20:45:46 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2025-06-18 20:45:46 +00:00
2026-05-21 00:02:29 +00:00
2026-02-19 23:33:36 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-02-19 23:33:36 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-19 18:01:54 +00:00
2026-05-21 00:02:29 +00:00
2025-12-11 19:44:39 +00:00
2026-05-07 13:44:40 +00:00
2026-05-04 19:11:51 +00:00
2026-05-12 22:15:09 +00:00
2026-05-12 22:15:09 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-21 00:02:29 +00:00
2026-05-22 02:48:07 +00:00
2026-03-26 18:43:29 +00:00