Stop treating symbolic binding patterns as constants (#5361)

This was originally needed to support constant evaluation of name
expressions, but that's now done in a different way.

This is actually a step toward treating all patterns as constants. The
upcoming change will do so in a slightly different way, and so it will
simplify the review to start from a baseline where patterns are never
constant.
This commit is contained in:
Geoff Romer
2025-04-28 23:45:15 +00:00
committed by GitHub
parent 13a522f608
commit 7c85397f8b
155 changed files with 952 additions and 3383 deletions
@@ -42,7 +42,7 @@ fn F(n: i32, a: array(i32, n)*);
// CHECK:STDOUT: %n.patt: %pattern_type.7ce = binding_pattern n
// CHECK:STDOUT: %n.param_patt: %pattern_type.7ce = value_param_pattern %n.patt, call_param0
// CHECK:STDOUT: %a.patt: <error> = binding_pattern a
// CHECK:STDOUT: %a.param_patt: <error> = value_param_pattern %a.patt, call_param1 [concrete = <error>]
// CHECK:STDOUT: %a.param_patt: <error> = value_param_pattern %a.patt, call_param1
// CHECK:STDOUT: } {
// CHECK:STDOUT: %n.param: %i32 = value_param call_param0
// CHECK:STDOUT: %.loc15_9: type = splice_block %i32.loc15_9 [concrete = constants.%i32] {